Part Number Hot Search : 
HM62V1 SR1680 FR150 2SC4622 LT1016 25X40 S9025 LB161
Product Description
Full Text Search
 

To Download AT86RF231-ZFR Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  features ? high performance rf-cmos 2.4 ghz radio transceiver targeted for ieee 802.15.4 ? , zigbee ? , 6lowpan, rf4ce, sp100, wirelesshart ? and ism applications ? industry leading link budget (104 db) ? receiver sensitivity -101 dbm ? programmable output power from -17 dbm up to +3 dbm ? ultra-low current consumption: ? ultra-low supply voltage (1.8v to 3.6v) with internal regulator ? optimized for low bom cost and ease of production: ? few external components necessary (crystal, capacitors and antenna) ? excellent esd robustness ? easy to use interface: ? registers, frame buffer and aes accessible through fast spi ? only two microcontroller gpio lines necessary ? one interrupt pin from radio transceiver ? clock output with prescale r from radio transceiver ? radio transceiver features: ? 128-byte fifo (sram) for data buffering ? programmable clock output, to clock the host microcontroller or as timer reference ? integrated rx/tx switch ? fully integrated, fast settling pll to support frequency hopping ? battery monitor ? fast wake-up time < 0.4 msec ? special ieee 802.15.4-2006 hardware support: ? fcs computation and clear channel assessment ? rssi measurement, energy detection and link quality indication ? mac hardware accelerator: ? automated acknowledgement, csma-ca and retransmission ? automatic address filtering ? automated fcs check ? extended feature set hardware support: ? aes 128-bit hardware accelerator ? rx/tx indication (external rf front-end control) ? rx antenna diversity ? supported psdu data rates: 250 kb/s, 500 kb/s, 1 mb/s and 2 mb/s ? true random number generation for security application ? industrial and extend ed temperature range: ? -40c to +85c and -40c to +125c ? i/o and packages: ? 32-pin low-profile qfn package 5 x 5 x 0.9 mm3 ? rohs/fully green ? compliant to ieee 802.15.4-2006 and ieee 802.15.4-2003 ? compliant to en 300 328/440, fcc-cfr- 47 part 15, arib std-t66, rss-210 ? sleep = 0.02 a ? trx_off = 0.4 ma ? rx_on = 12.3 ma ? busy_tx = 14 ma (at max. transmit power of +3 dbm) low power 2.4 ghz transceiver for zigbee, ieee 802.15.4, 6lowpan, rf4ce, sp100, wirelesshart, and ism applications at86rf231-zu at86rf231-zf 8111c?mcu wireless?09/09
2 8111c?mcu wireless?09/09 at86rf231 1. pin-out diagram figure 1-1. at86rf231 pin-out diagram note: the exposed paddle is electrically connected to the die inside the package. it shall be soldered to the board to ensure electrical and thermal contact and good mechanical stability. 32 24 23 22 21 20 19 18 17 1 2 3 4 5 6 7 8 at 86 rf 231 clkm dvss dig3 dig4 avss avss rfp rfn dvss /r st dig1 dig2 slp_tr dvss dvdd dvdd devdd dvss sclk miso dvss mosi /sel ir q xtal2 xtal1 avss evdd avdd avss avss avss 31 30 29 28 27 26 25 9 10111213141516 avss exposed paddle
3 8111c?mcu wireless?09/09 at86rf231 1.1 pin descriptions table 1-1. pin description at86rf231 pins name type description 1 dig3 digital output (ground) 1. rx/tx indicator, see section 11.5 2. if disabled, pull-down enabled (avss) 2 dig4 digital output (ground) 1. rx/tx indicator (dig3 inverted), see section 11.5 2. if disabled, pull-down enabled (avss) 3 avss ground ground for rf signals 4 rfp rf i/o differential rf signal 5 rfn rf i/o differential rf signal 6 avss ground ground for rf signals 7 dvss ground digital ground 8 /rst digital input chip reset; active low 9 dig1 digital output (ground) 1. antenna diversity rf switch control, see section 11.4 2. if disabled, pull-down enabled (dvss) 10 dig2 digital output (ground) 1. antenna diversity rf switch control (dig1 inverted), see section 11.4 2. signal irq_2 (rx_start) for rx frame time stamping, see section 11.6 3. if functions disabled, pull-down enabled (dvss) 11 slp_tr digital input controls sleep, transmit start, receive states; active high, see section 6.5 12 dvss ground digital ground 13 dvdd supply regulated 1.8v voltag e regulator; digital domain, see section 9.4 14 dvdd supply regulated 1.8v voltag e regulator; digital domain, see section 9.4 15 devdd supply external supply voltage; digital domain 16 dvss ground digital ground 17 clkm digital output master clock signal output; low if disabled, see section 9.6 18 dvss ground digital ground 19 sclk digital input spi clock 20 miso digital output spi data output (master input slave output) 21 dvss ground digital ground 22 mosi digital input spi data input (master output slave input) 23 /sel digital input spi select, active low 24 irq digital output 1. interrupt request signal; active high or active low; configurable 2. frame buffer empty indicator; active high, see section 11.7 25 xtal2 analog input crystal pin, see section 9.6 26 xtal1 analog input crystal pin or external clock supply, see section 9.6 27 avss ground analog ground 28 evdd supply external supply voltage, analog domain
4 8111c?mcu wireless?09/09 at86rf231 29 avdd supply regulated 1.8v volt age regulator; analog domain, see section 9.4 30 avss ground analog ground 31 avss ground analog ground 32 avss ground analog ground paddle avss ground analog ground; exposed paddle of qfn package table 1-1. pin description at86rf231 (continued) pins name type description
5 8111c?mcu wireless?09/09 at86rf231 1.2 analog and rf pins 1.2.1 supply and ground pins evdd, devdd evdd and devdd are analog and digital supply voltage pins of the at86rf231 radio transceiver. avdd, dvdd avdd and dvdd are outputs of the internal 1.8v voltage regulators. the voltage regulators are controlled independently by the radio transcei vers state machine and are activated dependent on the current radio transceiver state. the voltage regulators can be configured for external supply. for details, refer to section 9.4 ?voltage regulators (avreg, dvreg)? on page 110 . avss, dvss avss and dvss are analog and digi tal ground pins respectively. the analog and digital power domains should be separated on the pcb. 1.2.2 rf pins rfn, rfp a differential rf port (rfp/rfn) provides common-mode rejection to suppress the switching noise of the internal digital signal processing blocks. at board-level, the differential rf layout ensures high receiver sensitivity by rejecting any spurious emissions originated from other digital ics such as a microcontroller. a simplified schematic of the rf front end is shown in figure 1-2 on page 5 . figure 1-2. simplified rf front-end schematic the rf port is designed for a 100 differential load. a dc path between the rf pins is allowed. a dc path to ground or supply voltage is not allowed. therefore, when connecting an rf-load providing a dc path to the power supply or ground, ac-coupling is required as indicated in table 1-2 on page 6 . lna pa rfp rfn rxtx 0.9v tx rx cm feedback m0 at86rf231 pcb
6 8111c?mcu wireless?09/09 at86rf231 the rf port dc values depend on the operating state, refer to section 7. ?operating modes? on page 33 . in trx_off state, when the analog front-end is disabled (see section 7.1.2.3 ?trx_off - clock state? on page 35 ), the rf pins are pulled to ground, preventing a floating voltage. in transmit mode, a control loop provides a common-mode voltage of 0.9v. transistor m0 is off, allowing the pa to set the common-mode voltage. the common-mode capacitance at each pin to ground shall be < 30 pf to ensure the stability of this commo n-mode feedback loop. in receive mode, the rf port provides a low-impedance path to ground when transistor m0, see figure 1-2 on page 5 , pulls the inductor center tap to ground. a dc voltage drop of 20 mv across the on-chip inductor can be measured at the rf pins. 1.2.3 crystal oscillator pins xtal1, xtal2 the pin xtal1 is the input of the reference os cillator amplifier (xosc), xtal2 is the output. a detailed description of the crystal oscillator setup an d the related xtal1/ xtal2 pin configura- tion can be found in section 9.6 ?crystal oscilla tor (xosc)? on page 116 . when using an external clock reference signal, xtal1 shall be used as input pin. for further details, refer to section 9.6.3 ?external reference frequency setup? on page 117 . 1.2.4 analog pin summary table 1-2. analog pin behavior - dc values pin values and conditions comments rfp/rfn v dc = 0.9v (busy_tx) v dc = 20 mv (receive states) v dc = 0 mv (otherwise) dc level at pins rfp/rfn for various transceiver states ac coupling is required if an anten na with a dc path to ground is used. serial capacitance and capacitance of each pin to ground must be < 30 pf. xtal1/ xtal2 v dc = 0.9v at both pins c pa r = 3 pf dc level at pins xtal1/xtal2 for various transceiver states parasitic capacitance (c pa r ) of the pins must be considered as additional load capacitance to the crystal. dvdd v dc = 1.8v (all states, except sleep) v dc = 0 mv (otherwise) dc level at pin dvdd for various transceiver states supply pins (voltage regulator output) for the digital 1.8v voltage domain, recommended bypass capacitor 1 f. avdd v dc = 1.8v (all states, except p_on, sleep, reset, and trx_off) v dc = 0 mv (otherwise) dc level at pin avdd for various transceiver states supply pin (voltage regulator output) for the analog 1.8v voltage domain, recommended bypass capacitor 1 f.
7 8111c?mcu wireless?09/09 at86rf231 1.3 digital pins the at86rf231 provides a digital microcontroller interface. the interface comprises a slave spi (/sel, sclk, mosi and miso) and additional control signals (clkm, irq, slp_tr, /rst and dig2). the microcontroller interface is described in detail in section 6. ?microcontroller interface? on page 16 . additional digital output signals dig1...dig4 are pr ovided to control external blocks, i.e. for antenna diversity rf switch control or as an rx/tx indicator, see section 11.4 ?antenna diver- sity? on page 142 and section 11.5 ?rx/tx indicator? on page 147 . after reset, these pins are pulled-down to digital ground (dig1/dig2) or analog ground (dig3/dig4). 1.3.1 driver strength settings the driver strength of all digital output pi ns (miso, irq, dig1, dig2, dig3, dig4) and clkm pin can be configured using register 0x03 (trx_ctrl_0), see table 1-3 on page 7 . the capacitive load should be as small as possible as, not larger than 50 pf when using the 2 ma minimum driver strength setting. generally , the output driver strength should be adjusted to the lowest possible value in order to keep the current consumption and the emission of digital signal harmonics low. 1.3.2 pull-up and pull-down configuration all digital input pins are internally pulled-up or pulled-down in radio transceiver state p_on, see section 7.1.2.1 ?p_on - power-on after vdd? on page 34 . table 1-4 on page 7 summarizes the pull-up and pull-down configuration. in all other radio transceiver states, no pull-up or pull-down circuitry is connected to any of the digital input pins mentioned in table 1-4 on page 7 . in reset state, the pull-up / pull-down con- figuration is disabled. table 1-3. digital output driv er configuration pins default driver strength recommendation/comment miso, irq, dig1,..., dig4 2 ma adjustable to 2 ma, 4 ma, 6 ma and 8 ma clkm 4 ma adjustable to 2 ma, 4 ma, 6 ma and 8 ma table 1-4. pull-up / pull-down config uration of digital input pins in p_on state pins h pull-up, l pull-down /rst h /sel h sclk l mosi l slp_tr l = ? = ?
8 8111c?mcu wireless?09/09 at86rf231 1.3.3 register description register 0x03 (trx_ctrl_0): the trx_ctrl_0 register controls the drive current of the digital output pads and the clkm clock rate. ? bit [7:6] - pad_io the register bits set the output driver current of all digital output pads, except clkm. note: 1. reset values of register bits ar e underlined characterized in the document. ? bit [5:4] - pad_io_clkm the register bits set the output driver current of pin clkm. refer also to section 9.6 ?crystal oscillator (xosc)? on page 116 . ? bit 3 - clkm_sha_sel refer to section 9.6 ?crystal osc illator (xosc)? on page 116 . ? bit [2:0] - clkm_ctrl refer to section 9.6 ?crystal osc illator (xosc)? on page 116 . bit 7 6 5 4 3 2 1 0 0x03 pad_io pad_io_clkm clkm_sha_sel clkm_ctrl trx_ctrl_0 read/write r/w r/w r/w r/w r/w r/w r/w r/w initial value 0 0 0 1 1 0 0 1 table 1-5. digital output driver strength register bit value description pa d _ i o 0 (1) 2 ma 14 ma 26 ma 38 ma table 1-6. clkm driver strength register bit value description pad_io_clkm 0 2 ma 1 4 ma 26 ma 38 ma
9 8111c?mcu wireless?09/09 at86rf231 2. disclaimer typical values contained in this datasheet are based on simulations and testing. min and max values are available when the radio transceiver has been fully characterized. 3. overview the at86rf231 is a feature rich, low-power 2. 4 ghz radio transceiver designed for industrial and consumer zigbee/ieee 802.15.4, 6lowpan, rf4ce and high data rate 2.4 ghz ism band applications. the radio transceiver is a true spi-to-antenna solution. all rf-critical components except the antenna, crystal and de-coupling capacitors are integrated on-chip. therefore, the at86rf231 is particularly su itable for app lications like: ? 2.4 ghz ieee 802.15.4 and zigbee systems ? 6lowpan and rf4ce systems ? wireless sensor networks ? industrial control, sensing and automation (sp100, wirelesshart) ? residential and commercial automation ? health care ? consumer electronics ? pc peripherals the at86rf231 can be operated by using an external microcontroller like atmel's avr micro- controllers. a comprehensive software programming description can be found in reference [6] , at86rf231 software programming model.
10 8111c?mcu wireless?09/09 at86rf231 4. general circuit description this single-chip radio transceiver provides a complete radio transceiver interface between an antenna and a microcontroller. it comprises t he analog radio, digital modulation and demodula- tion including time and frequency synchronization and data buffering. the number of external components is minimized such that only the antenna, the crystal and decoupling capacitors are required. the bidirectional differential antenna pins (rfp, rfn) are used for transmission and reception, thus no external antenna switch is needed. the at86rf231 block diagram is shown in figure 4-1 on page 10 . figure 4-1. at86rf231 block diagram the received rf signal at pins rfn and rfp is differentially fed through the low-noise amplifier (lna) to the rf filter (ppf) to generate a complex signal, driving the integrated channel filter (bpf). the limiting amplifier provides sufficient gain to drive the succeeding analog-to-digital converter (adc) and generates a digital rssi si gnal. the adc output signal is sampled by the digital base band receiver (rx bbp). the transmit modulation schem e is offset-qpsk (o-qpsk) with ha lf-sine pulse s haping and 32- length block coding (spreading) according to [1] and [2] . the modulation signal is generated in the digital transmitter (tx bbp) and applied to the fractional-n frequency synthesis (pll), to ensure the coherent phase modu lation required for demodulation of o-q psk signals. the fre- quency-modulated signal is fed to the power amplifier (pa). a differential pin pair dig3/dig4 can be enabled to control an external rf front-end. two on-chip low-dropout voltage regulators (a|dvreg) provide the analog and digital 1.8v supply. avreg lna pll pa ppf bpf limiter adc agc ext. pa and power control configuration registers spi (slave) rssi irq clkm /rst slp_tr /sel miso mosi sclk dig3/4 rfp rfn tx data control logic dig2 antenna diversity ftn, batmon xosc xtal1 xtal2 analog domain digital domain aes dig1/2 ad dvreg rx bbp frame buffer tx bbp
11 8111c?mcu wireless?09/09 at86rf231 an internal 128-byte ram for rx and tx (frame buffer) buffers the data to be transmitted or the received data. the configuration of the at86rf231, reading and writing of frame buffer is controlled by the spi interface and additional control lines. the at86rf231 further contains comprehensive hardware-mac support (extended operating mode) and a security en gine (aes) to improve the overall system power efficiency and timing. the stand-alone 128-bit aes engine can be accessed in parallel to all phy operational transac- tions and states using the spi in terface, except during sleep state. for applications not necessarily targeting ieee 802.15.4 compliant networks, the radio trans- ceiver also supports alternative data rates up to 2 mb/s. for long-range applicat ions or to improve the reliability of an rf connection th e rf performance can further be improved by using an external rf front-end or antenna diversity. both operation modes are supported by the at86rf231 with dedicated control pins without the interaction of the microcontroller. additional features of the extended feature set, see section 11. ?at86rf231 extended fea- ture set? on page 128 , are provided to simplify the inte raction between radio transceiver and microcontroller.
12 8111c?mcu wireless?09/09 at86rf231 5. application circuits 5.1 basic application schematic a basic application schematic of the at86rf231 with a single-ended rf connector is shown in figure 5-1 on page 12 . the 50 single-ended rf input is transformed to the 100 differential rf port impedance using balun b1. the capacitor s c1 and c2 provide ac coupling of the rf input to the rf port, optional capacitor c4 improves matching if required. figure 5-1. basic application schematic the power supply decoupling capacitors (cb2, cb 4) are connected to the external analog sup- ply pin (evdd, pin 28) and external digital su pply pin (devdd, pin 15). capacitors cb1 and cb3 are bypass capacitors for the integrated analog and digital voltage regulators to ensure sta- ble operation. all decoupling and bypass capacitors should be placed as close as possible to the pins and should have a low-resistance and low-inductance connection to ground to achieve the best performance. the crystal (xtal), the two load capacitors (cx1 , cx2), and the internal circuitry connected to pins xtal1 and xtal2 form the cr ystal oscillator. to achieve the best accuracy and stability of the reference frequency, large parasitic capacitanc es should be avoided. crystal lines should be 8 7 6 5 4 3 2 1 9 10 11 12 13 14 15 16 2526272829 3031 32 at86rf231 dig3 avss dig4 avss avss rfp rfn avss dvss dig1 dig2 slp_tr dvss dvdd dvdd xtal2 devdd dvss avss avdd evdd avss xtal1 17 18 19 20 21 22 23 24 dvss clkm irq miso dvss mosi sclk cb3 cb4 digital interface /rst /sel v dd xtal cx1 cx2 cb1 v dd cb2 c1 c2 b1 rf c3 r1 c4
13 8111c?mcu wireless?09/09 at86rf231 routed as short as possible and not in proximity of digital i/o signals. this is especially required for the high data rate modes, refer to section 11.3 ?high data rate modes? on page 137 . crosstalk from digital signals on the crystal pins or the rf pins can degrade the system perfor- mance. therefore, a low-pass filter (c3, r1) is placed close to the clkm output pin to reduce the emission of clkm signal harmonics. this is not needed if the clkm pin is not used as a microcontroller clock source. in that case, the output should be turned off during device initialization. the ground plane of the application board should be separated into four independent fragments, the analog, the digital, the antenna and the xtal ground plane. the exposed paddle shall act as the reference point of the individual grounds. note: please note that pins dig1...4 are connected to the ground in the basic application schematic, refer to figure 5-1 on page 12 . special programming of these pins require a different schematic, refer to ?extended feature set ap plication schematic? on page 14 . table 5-1. example bill of materials (bom) for basic application schematic designator description value manufacture part number comment b1 smd balun 2.45 ghz wuerth 748421245 2.45 ghz balun b1 (alternatively) smd balun / filter 2.45 ghz johanson technology 2450fb15l0001 2.45 ghz balun / filter cb1 cb3 ldo vreg bypass capacitor 1 f avx murata 0603yd105kat2a grm188r61c105ka12d x5r (0603) 10% 16v cb2 cb4 power supply decoupling cx1, cx2 crystal load capacitor 12 pf avx murata 06035a120ja grp1886c1h120ja01 cog (0603) 5% 50v c1, c2 rf coupling capacitor 22 pf epcos epcos avx b37930 b37920 06035a220jat2a cog 5% (0402 or 0603) c3 clkm low-pass filter capacitor 2.2 pf avx murata 06035a229da grp1886c1h2r0da01 cog (0603) 0.5 pf designed for f clkm =1 mhz c4 (optional) rf matching 0.47 pf depends on final pcb implementation r1 clkm low-pass filter resistor 680 designed for f clkm =1 mhz xtal crystal cx-4025 16 mhz sx-4025 16 mhz acal taitjen siward xwbbpl-f-1 a207-011
14 8111c?mcu wireless?09/09 at86rf231 5.2 extended feature set application schematic the at86rf231 supports additional features like: an extended feature set application schematic illustrating the use of the at86rf231 extended feature set, see section 11. ?at86rf231 extended feature set? on page 128 , is shown in fig- ure 5-2 on page 14 . although this example shows all addi tional hardware features combined, it is possible to use all features separately or in various combinations. figure 5-2. extended feature application schematic in this example, a balun (b1) transforms the differential rf signal at the radio transceiver rf pins (rfp/rfn) to a single ended rf signal, sim ilar to the basic application schematic; refer to figure 5-1 on page 12 . the rf-switches (sw1, sw2) separate between receive and transmit path in an external rf front-end. these switches are controlled by the rx/tx indicator, represented by the differential pin pair dig3/dig4, refer to section 11.5 ?rx/tx indicator? on page 147 . during receive the radio transceiver searches for the most reliable rf signal path using the antenna diversity algorithm. one antenna is sele cted (sw2) by the antenna diversity rf switch ? security module (aes) see section 11.1 ? high data rate mode see section 11.3 ? antenna diversity uses pins dig1/2 see section 11.4 ? rx/tx indicator uses pins dig3/4 see section 11.5 ? rx frame time stamp uses pin dig2 see section 11.6 8 7 6 5 4 3 2 1 9 10111213141516 2526 2728 2930 31 32 at86rf231 dig3 avss dig4 avss avss rfp rfn avss dvss dig1 dig2 slp_tr dvss dvdd dvdd xtal2 devdd dvss avss avdd evdd avss xtal1 17 18 19 20 21 22 23 24 dvss clkm irq miso dvss mosi sclk cb3 cb4 xtal cx1 cx2 cb1 digital interface v dd /rst /sel balun rf- switch ant0 ant1 rf- switch b1 sw1 sw2 v dd cb2 c3 r1 pa lna n1 n2
15 8111c?mcu wireless?09/09 at86rf231 control pins dig1/dig2, the rf signal is amplif ied by an optional low-noise amplifier (n2) and fed to the radio transceiver using the second rx/tx switch (sw1). during transmit the at86rf231 tx signal is amplif ied using an external pa (n1) and fed to the antennas via an rf switch (sw2). in this example rf switch sw2 further supports antenna diversity controlled by the differential pin pair dig1/dig2. the security engine (aes) and high data rate modes do not requir e specific circuitry to oper- ate. the security engi ne (aes) has to be configured in advance, for de tails refer to section 11.1 ?security module (aes)? on page 128 . the high data rate modes are enabled by register bits oqpsk_data_rate (register 0x0c, trx_ctrl_2), for details refer to section 11.3 ?high data rate modes? on page 137 .
16 8111c?mcu wireless?09/09 at86rf231 6. microcontroller interface this section describes the at86rf231 to microc ontroller interface. the interface comprises a slave spi and additional control signals; see figure 6-1 on page 16 . the spi timing and protocol are described below. figure 6-1. microcontroller to at86rf231 interface microcontrollers with a master spi such as at mel's avr family interf ace directly to the at86rf231. the spi is used for register, frame buffer, sram and aes access. the additional control signals are connected to the gpio/irq interface of the microcontroller. table 6-1 on page 16 introduces the radio transceiver i/o signals and their functionality. table 6-1. signal description of microcontroller interface signal description /sel spi select signal, active low mosi spi data (master output slave input) signal miso spi data (master input slave output) signal sclk spi clock signal clkm clock output, refer to section 9.6.4 usable as: -microcontroller clock source -high precision timing reference -mac timer reference irq interrupt request signal, further used as: -frame buffer empty indicator, refer to section 11.7 microcontroller at86rf231 /sel mosi miso sclk clkm irq slp_tr mosi miso sclk gpio1/clk gpio2/irq gpio3 mosi miso sclk clkm irq slp_tr /rst gpio4 spi /sel /sel /rst dig2 gpio5 dig2 spi - master spi - slave
17 8111c?mcu wireless?09/09 at86rf231 6.1 spi timing description pin 17 (clkm) can be used as a microcontroller master clock source. if the microcontroller derives the spi master clock (sclk) directly from clkm, the spi operates in synchronous mode, otherwise in asynchronous mode. in synchronous mode, the maximum sclk frequency is 8 mhz. in asynchronous mode, the maximum sclk frequency is limited to 7.5 mhz. the signal at pin clkm is not required to derive sclk and may be disabled to reduce power consumption and spurious emissions. figure 6-2 on page 17 and figure 6-3 on page 17 illustrate the spi timing and introduces its parameters. the corresponding timing parameter definitions t 1 - t 9 are defined in section 12.4 ?digital interface timing characteristics? on page 157 . figure 6-2. spi timing, global map and definition of timing parameters t 5 , t 6 , t 8 and t 9 figure 6-3. spi timing, detailed drawin g of timing parameter t 1 to t 4 slp_tr multipurpose control signal (functionality is state dependent, see section 6.5 ): -sleep/wakeup enable/disable sleep state -tx start busy_ tx_(aret) state -disable/enable clkm rx_(aack)_on state /rst at86rf231 reset signal, active low dig2 optional, irq_2 (rx_start) fo r rx frame time stamping, see section 11.6 table 6-1. signal description of microcontroller interface (continued) sclk t 8 mosi 6 7 5 4 3 2 1 0 6 7 5 4 3 2 1 0 miso bit 6 bit 5 bit 3 bit 2 bit 1 bit 0 bit 4 bit 6 bit 5 bit 3 bit 2 bit 1 bit 0 bit 4 bit 7 t 6 bit 7 t 5 /sel t 9 bit 7 bit 6 t 1 t 2 bit 5 t 4 t 3 bit 7 bit 6 bit 5 sclk mosi miso /sel
18 8111c?mcu wireless?09/09 at86rf231 the spi is based on a byte-oriented protocol and is always a bidirectional communication between master and slave. the spi master starts the transfer by asserting /sel = l. then the master generates eight spi clock cycles to transfer one byte to the radio transceiver (via mosi). at the same time, the slave transmits one byte to the master (via miso). when the master wants to receive one byte of data from the slave it must also transmit one byte to the slave. all bytes are transferred with msb first. an spi transaction is finished by releasing /sel = h. an spi register access consists of two bytes, a frame buffer or sram access of at least two or more bytes as described in section 6.2 ?spi protocol? on page 19 . /sel = l enables the miso output driver of the at86rf231. the msb of miso is valid after t1 (see section 12.4 ?digital interface timing characteristics? on page 157 parameter 12.4.3) and is updated at each falling edge of sclk. if the driver is disabl ed, there is no in ternal pull-up cir- cuitry connected to it. driving the appropriate signal level must be ensured by the master device or an external pull-up resistor. note, when both /sel and /rst are active, the miso output driver is also enabled. referring to figure 6-2 on page 17 and figure 6-3 on page 17 mosi is sampled at the rising edge of the sclk signal and the output is set at the falling edge of sclk. the signal must be stable before and after the rising edge of sclk as specified by t 3 and t 4 , refer to section 12.4 ?digital interface timing characteristics? on page 157 parameters 12.4.5 and 12.4.6. this spi operational mode is commonly known as " spi mode 0 ".
19 8111c?mcu wireless?09/09 at86rf231 6.2 spi protocol each spi sequence starts with transferring a command byte from the spi master via mosi (see table 6-2 on page 19 ) with msb first. this command byte defines the spi access mode and additional mode-dependent information. each spi transfer returns bytes back to the spi master on miso. the content of the first byte (see value "phy_status" in figure 6-4 on page 19 to figure 6-14 on page 23 ) is set to zero after reset. to transfer status information of the radio transceiver to the microcontroller, the con- tent of the first byte can be configured with register bits spi_cmd_mode (register 0x04, trx_ctrl_1). for details, refer to section 6.3.1 ?register description - spi control? on page 24 . in figure 6-4 on page 19 to figure 6-14 on page 23 and the following chapters logic values stated with xx on mosi are ignored by the radio transceiver, but need to have a valid logic level. return values on miso stated as xx shall be ignored by the microcontroller. the different access modes are described within the following sections. 6.2.1 register access mode a register access mode is a two-byte read/write operation initiated by /sel = l. the first trans- ferred byte on mosi is the command byte including an identifier bit (bit7 = 1), a read/write select bit (bit 6), and a 6-bit register address. on read access, the content of the selected register address is returned in the second byte on miso (see figure 6-4 on page 19 ). figure 6-4. packet structure - re gister read access note: 1. each spi access can be configured to return radio controller status information (phy_status) on miso, for details refer to section 6.3 ?radio transceiver status informa- tion? on page 24 . on write access, the second byte transferred on mosi contains the write data to the selected address (see figure 6-5 on page 20 ). table 6-2. spi command byte definition bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 access mode access type 1 0 register address [5:0] register access read access 1 1 register address [5:0] write access 001 reserved frame buffer access read access 0 1 1 reserved write access 000 reserved sram access read access 0 1 0 reserved write access 1 address[5:0] 0 xx mosi phy_status (1) read data[7:0] miso byte 1 (command byte) byte 2 (data byte)
20 8111c?mcu wireless?09/09 at86rf231 figure 6-5. packet structure - re gister write access each register access must be terminated by setting /sel = h. figure 6-6 on page 20 illustrates a typical spi sequence for a register access sequence for write and read respectively. figure 6-6. example spi sequence - register access mode 6.2.2 frame buffer access mode the 128-byte frame buffer can hold the phy service data unit (psdu) data of one ieee 802.15.4 compliant rx or one tx frame of maximum length at a time. a detailed descrip- tion of the frame buffer can be found in section 9.3 ?frame buffer? on page 107 . an introduction to the ieee 802.15.4 frame format can be found in section 8.1 ?introduction - ieee 802.15.4 - 2006 frame format? on page 79 . frame buffer read and write accesses are used to read or write frame data (psdu and addi- tional information) from or to the frame buffer. each access starts with /sel = l followed by a command byte on mosi. if this byte indicates a frame read or write access, the next byte phr[7:0] indicates the frame length followed by the psdu data, see figure 6-7 on page 20 and figure 6-8 on page 21 . on frame buffer read access, phy header (phr) and psdu are transferred via miso starting with the second byte. after the psdu data, one more byte is transferred containing the link qual- ity indication (lqi) value of the received frame, for details refer to section 8.6 ?link quality indication (lqi)? on page 99 . figure 6-7 on page 20 illustrates the packet structure of a frame buffer read access. figure 6-7. packet structure - frame read access 1 address[5:0] 1 write data[7:0] mosi phy_status xx miso byte 1 (command byte) byte 2 (data byte) phy_status xx phy_status read data write command write data read command xx register write access register read access sclk mosi miso /sel 0 reserved[4:0] 0 mosi phy_status miso byte 1 (command byte) 1 xx phr[7:0] byte 2 (data byte) xx psdu[7:0] byte 3 (data byte) xx psdu[7:0] byte n-1 (data byte) xx lqi[7:0] byte n (data byte)
21 8111c?mcu wireless?09/09 at86rf231 note, the frame buffer read access can be terminated at any time without any consequences by setting /sel = h, e.g. after reading the phr byte only. on frame buffer write access the second byte transferred on mosi contains the frame length (phr field) followed by the payload data (psdu) as shown by figure 6-8 on page 21 . figure 6-8. packet structure - frame write access the number of bytes n for one frame access is calculated as follows: the maximum value of frame_length is 127 bytes. that means that n 130 for frame buffer read and n 129 for frame buffer write accesses. each read or write of a data byte increments automatically the address counter of the frame buffer until the access is terminated by setting /sel = h. a frame buffer read access may be terminated (/sel = h) at any time without affecting the frame buffer content. another frame buffer read operation starts again at the phr field. the content of the frame buffer is only overwr itten by a new received frame or a frame buffer write access. figure 6-9 on page 21 and figure 6-10 on page 22 illustrate an example spi sequence of a frame buffer access to read and write a frame with 4-byte psdu respectively. figure 6-9. example spi sequence - frame buffer read of a frame with 4-byte psdu 0 reserved[4:0] 1 mosi phy_status miso byte 1 (command byte) 1 phr[7:0] xx byte 2 (data byte) psdu[7:0] xx byte 3 (data byte) psdu[7:0] xx byte n -1 (data byte) psdu[7:0] xx byte n (data byte) ? read access: n = 3 + frame_length [ phy_status, phr byte, psdu data, and lqi byte] ? write access: n = 2 + frame_length [command byte, phr byte, and psdu data] command xx xx xx xx xx phy_status phr psdu 2 psdu 1 psdu 4 psdu 3 xx lqi sclk mosi miso /sel
22 8111c?mcu wireless?09/09 at86rf231 figure 6-10. example spi sequence - frame buffer write of a frame with 4 byte psdu access violations during a frame buffer read or write access are indicated by interrupt irq_6 (trx_ur). for further details, refer to section 9.3 ?frame buffer? on page 107 . notes ? the frame buffer is shared between rx and tx; therefore, the frame data are overwritten by new incoming frames. if the tx frame data are to be retransmitted, it must be ensured that no frame was received in the meanwhile. ? to avoid overwriting during receive dynamic frame buffer protection can be enabled, refer to section 11.8 ?dynamic frame buffer protection? on page 154 . ? it is not possible to retransmit received frames without a frame buffer read and write access cycle. ? for exceptions, e.g. receiving acknowledgement frames in extended operating mode (tx_aret) refer to section 7.2.4 ?tx_aret_on - transmit with automatic retry and csma-ca retry? on page 64 . 6.2.3 sram access mode the sram access mode allows accessing dedica ted bytes within the frame buffer. this may reduce the spi traffic. the sram access mode is useful, for instance, if a transmit frame is already stored in the frame buffer and dedicated bytes (e.g. sequence number , address field) need to be replaced before retransmitting the frame. furthermore, it can be used to access only the lqi value after frame reception. a detailed description of the user accessible frame content can be found in section 9.3 ?frame buffer? on page 107 . each sram access starts with /sel = l. the first transferred byte on mosi shall be the com- mand byte and must indicate an sram access mode according to the definition in table 6-2 on page 19 . the following byte indicates the start address of the write or read access. the address space is 0x00 to 0x7f for radio transc eiver receive or transmit operations. on sram read access, one or more bytes of read data are transferred on miso starting with the third byte of the access sequence (see figure 6-11 on page 22 ). figure 6-11. packet structure - sram read access command phr psdu 1 psdu 2 psdu 3 psdu 4 phy_status xx xx xx xx xx sclk mosi miso /sel 0 reserved[4:0] 0 mosi phy_status miso byte 1 (command byte) 0 address[6:0] xx byte 2 (address) xx data[7:0] byte 3 (data byte) xx data[7:0] byte n -1 (data byte) xx data[7:0] byte n (data byte) 0
23 8111c?mcu wireless?09/09 at86rf231 on sram write access, one or more bytes of write data are transferred on mosi starting with the third byte of the access sequence (see figure 6-12 on page 23 ). on sram read or write accesses do not attempt to read or write bytes beyond the sram buffer size. figure 6-12. packet structure - sram write access as long as /sel = l, every subsequent byte read or byte write increments the address counter of the frame buffer until the sram access is terminated by /sel = h. figure 6-13 on page 23 and figure 6-14 on page 23 illustrate an example spi sequence of a sram access to read and write a data package of 5-byte length respectively. figure 6-13. example spi sequence - sram read access of a 5 byte data package figure 6-14. example spi sequence - sram write access of a 5 byte data package notes ? the sram access mode is not intended to be used as an alternative to the frame buffer access modes (see section 6.2.2 ?frame buffer access mode? on page 20 ). ? if the sram access mode is used to read psdu data, the frame buffer contains all psdu data except the frame length byte (phr). the frame length information can be accessed only using frame buffer access. ? frame buffer access violations are not indicated by a trx_ur interrupt when using the sram access mode, for further details refer to section 9.3.3 ?interrupt handling? on page 109 . 0 reserved[4:0] 1 mosi phy_status miso byte 1 (command byte) 0 data[7:0] xx byte 3 (data byte) data[7:0] xx byte n -1 (data byte) data[7:0] xx byte n (data byte) address[6:0] xx byte 2 (address) 0 command address xx xx xx xx phy_status xx data 2 data 1 data 4 data 3 xx data 5 sclk mosi miso /sel command address data 1 data 2 data 3 data 4 phy_status xx xx xx xx xx data 5 xx sclk mosi miso /sel
24 8111c?mcu wireless?09/09 at86rf231 6.3 radio transceiver st atus information each spi access can be configured to return status information of the radio transceiver (phy_status) to the microcontroller using the first byte of the data transferred via miso. the content of the radio transceiver status information can be configured using register bits spi_cmd_mode (register 0x04, trx_ctrl_1). afte r reset, the content on the first byte send on miso to the microcontroller is set to 0x00. 6.3.1 register description - spi control register 0x04 (trx_ctrl_1): the trx_ctrl_1 register is a multi purpose regi ster to control various operating modes and settings of the radio transceiver. ? bit 7 - pa_ext_en refer to section 11.5 ?rx/tx indicator? on page 147 . ? bit 6 - irq_2_ext_en refer to section 11.6 ?rx frame time stamping? on page 150 . ? bit 5 - tx_auto_crc_on refer to section 8.2 ?frame check sequence (fcs)? on page 85 . ? bit 4 - rx_bl_ctrl refer to section 11.7 ?frame buffer empty indicator? on page 152 . ? bit [3:2] - spi_cmd_mode each spi transfer returns bytes back to the spi master. the content of the first byte can be con- figured using register bits spi_cmd_mode. the tr ansfer of the following status information can be configured as follows: ? bit 1 - irq_mask_mode refer to section 6.6 ?interrupt logic? on page 29 . ? bit 0 - irq_polarity refer to section 6.6 ?interrupt logic? on page 29 . bit 7 6 5 4 3 2 1 0 +0x04 pa_ext_en irq_2_ext_en tx_auto_crc_on rx_bl_ctrl spi_cmd_mode irq_mask_mode irq_polarity trx_ctrl_1 read/write r/w r/w r/w r/w r/w r/w r/w r/w initial value 0 0 1 0 0 0 0 0 table 6-3. radio transceiver status information - phy_status register bit value description spi_cmd_mode 0 default (empty, all bits 0x00) 1 monitor trx_status register; see section 7.1.5 2 monitor phy_rssi register; see section 8.3 3 monitor irq_status register; see section 6.6
25 8111c?mcu wireless?09/09 at86rf231 6.4 radio transceiver identification the at86rf231 can be identified by four registers. one register contains a unique part number and one register the corresponding version numb er. two additional registers contain the jedec manufacture id. 6.4.1 register description - at86rf231 identification register 0x1c (part_num): ? bit [7:0] - part_num this register contains the radio transceiver part number. register 0x1d (version_num): ? bit [7:0] - version_num this register contains the radio transceiver version number. register 0x1e (man_id_0): ? bit [7:0] - man_id_0 bits [7:0] of the 32-bit jedec manufacturer id are stored in register bits man_id_0. bits [15:8] are stored in register 0x1f (man_id_1). the highest 16 bits of the id are not stored in registers. b i t 76543210 +0x1c part_num[7:0] part_num r e a d / w r i t errrrrrrr r e s e t v a l u e00000011 table 6-4. radio transceiver part number register bit value description pa rt _ n u m 3 at86rf231 part number b i t 76543210 +0x1d version_num[7:0] version_num r e a d / w r i t errrrrrrr r e s e t v a l u e00000010 table 6-5. radio transceiver version number register bit value description version_num 2 revision a b i t 76543210 +0x1e man_id_0[7:0] man_id_o r e a d / w r i t errrrrrrr r e s e t v a l u e00011111
26 8111c?mcu wireless?09/09 at86rf231 register 0x1f (man_id_1): ? bit [7:0] - man_id_1 bits [15:8] of the 32-bit jedec manufacturer id are stored in register bits man_id_1. bits [7:0] are stored in register 0x1e (man_id_0). the higher 16 bits of the id are not stored in registers. table 6-6. jedec manufacturer id - bits [7:0] register bit value description man_id_0 0x1f atmel jedec manufacturer id, bits [7:0] of 32 bit manufacturer id: 00 00 00 1f b i t 76543210 +0x1f man_id_1[7:0] man_id_1 r e a d / w r i t errrrrrrr r e s e t v a l u e00000000 table 6-7. jedec manufacturer id - bits [15:8] register bit value description man_id_1 0x00 atmel jedec manufacturer id, bits [15:8] of 32 bit manufacturer id: 00 00 00 1f
27 8111c?mcu wireless?09/09 at86rf231 6.5 sleep/wake-up and tr ansmit signal (slp_tr) pin 11 (slp_tr) is a multi-functional pin. its function relates to the current state of the at86rf231 and is summarized in table 6-8 on page 27 . the radio transceiver states are explained in detail section 7. ?operating modes? on page 33 . in states pll_on and tx_aret_on, pin slp_tr is used as trigger input to initiate a tx trans- action. here pin slp_tr is sensitive on rising edge only. after initiating a state change by a rising edge at pin slp_tr in radio transceiver states trx_off, rx_on or rx_aack_on, the radio transceiver remains in the new state as long as the pin is logical high and returns to the preceding state with the falling edge. sleep state the sleep state is used when radio transceiver functionality is not required, and thus the at86rf231 can be powered down to reduce the overall power consumption. a power-down scenario is shown in figure 6-15 on page 28 . when the radio transceiver is in trx_off state the mi crocontroller forc es the at86rf231 to sleep by setting slp_tr = h. if pin 17 (clkm) provides a clock to the microcontr oller this clock is switched off after 35 clock cycles. this enables a microcontroller in a synchronous system to complete its power-down rou- tine and prevent deadlock situations. the at86rf231 awakes when the microcontroller releases pin slp_tr. this concept provides the lowest possible power consumption. the clkm clock frequency settings for 250 khz an d 62.5 khz are not intended to directly clock the microcontroller. when using these clock rates, clkm is turned off immediately when enter- ing sleep state. table 6-8. slp_tr multi-functional pin transceiver status functi on transition description pll_on tx start starts frame transmission tx_aret_on tx start starts tx_aret transaction trx_off sleep takes the radio transceiver into sleep state, clkm disabled sleep wakeup takes the radio transceiver back into trx_off state, level sensitive rx_on disable clkm takes the radio transceiver into rx_on_noclk state and disables clkm rx_on_noclk enable clkm takes the radio transceiver into rx_on state and enables clkm rx_aack_on disable clkm takes the radio transceiver into rx_aack_on_noclk state and disables clkm rx_aack_on_noclk enable clkm takes the radio transceiver into rx_aack_on state and enables clkm lh ? lh ? lh ? hl ? lh ? hl ? lh ? hl ?
28 8111c?mcu wireless?09/09 at86rf231 figure 6-15. sleep and wake-up initiated by asynchronous microcontroller timer note: timing figure t tr15 refer to section table 7-1 on page 42 . rx_on and rx_aack_on states for synchronous systems, where clkm is used as a microcontroller clock source and the spi master clock (sclk) is directly derived from clkm, the at86rf231 supports an additional power-down mode for receive operating states (rx_on and rx_aack_on). if an incoming frame is expected and no other applications are running on the microcontroller, it can be powered down without missing incoming frames. this can be achieved by a rising edge on pin slp_tr that turns off the clkm. then the radio transceiver state changes from rx_on or rx_aack_on (extended operating mode) to rx_on_noclk or rx_aack_on_noclk respectively. in case that a frame is received (e.g. indicated by an irq_2 (rx_start) interrupt) the clock output clkm is automatically switched on again. this scenario is shown in figure 6-16 on page 28 . in rx_on state, the clock at pin 17 (clkm) is switched off after 35 clock cycles when setting the pin slp_tr = h. the clkm clock frequency settings for 250 khz an d 62.5 khz are not intended to directly clock the microcontroller. when using these clock rates, clkm is turned off immediately when enter- ing rx_on_noclk and rx_aack_on_noclk respectively. in states rx_(aack)_on_noclk and rx_(aack)_on, the radio transceiver current con- sumptions are equivalent. however, the rx _(aack)_on_noclk current consumption is reduced by the current required for driving pin 17 (clkm). figure 6-16. wake-up initiated by radio transceiver interrupt clkm slp_tr 35 clkm clock cycles clkm off t tr15 async timer elapses (microcontroller) clkm slp_tr 35 clkm clock cycles clkm off irq typ. 5 s radio transceiver irq issued
29 8111c?mcu wireless?09/09 at86rf231 6.6 interrupt logic 6.6.1 overview the at86rf231 differentiates between nine interrupt events (eight physical interrupt registers, one shared by two functions). each interrupt is enabled by setting the corresponding bit in the interrupt mask register 0x0e (irq_mask). interna lly, each pending interrupt is stored in a sepa- rate bit of the interrupt status register. all interrupt events are or-combined to a single external interrupt signal (irq, pin 24). if an interrupt is issued (pin irq = h), the microcontroller shall read the interrupt status register 0x0f (irq_status) to determine the source of the interrupt. a read access to this register clears the interrupt status register and thus the irq pin, too. interrupts are not cleared automatically when the event that caused them vanishes. exceptions are irq_0 (pll_lock) and irq_1 (pll_unlock) because the occurrence of one clears the other. the supported interrupts for the basic operating mode are summarized in table 6-9 on page 29 . the interrupt irq_4 has two meanings, depending on the current radio transceiver state, refer to register 0x01 (trx_status). after p_on, sleep, or reset, th e radio transceiver issues an interrupt irq_4 (awake_end) when it enters state trx_off. the second meaning is only valid for receive states. if the microcontroller initiates an energy- detect (ed) or clear-channel-assessment (cca) measurement, the completion of the measure- ment is indicated by interrupt irq_4 (cca_ed_done), refer to section 8.4.4 ?interrupt handling? on page 92 and section 8.5.4 ?interrupt handling? on page 95 for details. after p_on or reset all interrupts are disabled. during radio transceiver initialization it is rec- ommended to enable ir q_4 (awake_end) to be notified once the trx_off state is entered. table 6-9. interrupt description in basic operating mode irq name description section irq_7 (bat_low) indicates a supply voltage below the programmed threshold. 9.5.4 irq_6 (trx_ur) indicates a frame buffer access violation. 9.3.3 irq_5 (ami) indicates address matching. 7.2.3.5 irq_4 (cca_ed_done) multi-functional interrupt: 1. awake_end: ? indicates radio transceiver reached trx_off state after p_on, reset, or sleep states. 2. cca_ed_done: ? indicates the end of a cca or ed measurement. 7.1.2.3 8.4.4 8.5.4 irq_3 (trx_end) rx: indicates the completion of a frame reception. tx: indicates the completion of a frame transmission. 7.1.3 7.1.3 irq_2 (rx_start) indicates the start of a psdu reception. the trx_state changes to busy_rx, the phr is valid to read from frame buffer. 7.1.3 irq_1 (pll_unlock) indicates pll unlock. if the radio transceiver is busy_tx / busy_tx_aret state, the pa is turned off immediately. 9.7.5 irq_0 (pll_lock) indicates pll lock. 9.7.5
30 8111c?mcu wireless?09/09 at86rf231 note that awake_end interrupt can usually not be seen when the transceiver enters trx_off state after reset, because register 0x0e (irq_mask) is reset to mask all inter- rupts. in this case, state trx_off is normally entered before the microcontroller could modify the register. the interrupt handling in extended operating mode is described in section 7.2.5 ?interrupt han- dling? on page 67 . if register bit irq_m ask_mode (register 0x04, trx_ctrl_1) is set, an interrupt event can be read from irq_status register even if the interr upt itself is masked. ho wever, in that case no timing information for this interrupt is provided. the irq pin polarity can be c onfigured with register bit irq_polarity (register 0x04, trx_ctrl_1). the default behavior is active high, which means that pin irq = h issues an interrupt request. if "frame buffer empty indicator" is enabled during frame buffer read access the irq pin has an alternative functionality, refer to section 11.7 ?frame buffer empty indicator? on page 152 for details. 6.6.2 register description register 0x0e (irq_mask): the irq_mask register is used to enable or disable individual inte rrupts. an interr upt is enabled if the corresponding bit is set to 1. all inte rrupts are disabled after power up sequence (p_on state) or rese t (reset state). if an interrupt is enabled it is recommended to read the interrupt status register 0x0f (irq_status) first to clear the history. register 0x0f (irq_status): the irq_status register contains the status of the pending interrupt requests. by reading the register after an interrupt is si gnaled at pin 24 (irq) the source of the issued interrupt can be identified. a read access to this register resets all interrupt bits, and so clears the irq_status register. if register bit irq_m ask_mode (register 0x04, trx_ctrl_1) is set, an interrupt event can be read from irq_status register even if the interrupt itself is masked. however in that case no timing information for this interrupt is provided. if register bit irq_mask_mode is set, it is recommended to read the interrupt status register 0x0f (irq_status) first to clear the history. bit 7 6 5 4 3 2 1 0 +0x0e mask_bat_low mask_trx_ur mask_ami mask_cca_ed_done mask_trx_end mask _rx_start mask _pll_unlock mask _pll_lock irq_mask read/write r/w r/w r/w r/w r/w r/w r/w r/w reset value 0 0 0 0 0 0 0 0 bit 7 6 5 4 3 2 1 0 +0x0f bat_low trx_ur ami cca_ed_done trx_end rx_start pll_unlock pll_lock irq_status read/write r r r r r r r r initial value 0 0 0 0 0 0 0 0
31 8111c?mcu wireless?09/09 at86rf231 register 0x04 (trx_ctrl_1): the trx_ctrl_1 register is a multi purpose regi ster to control various operating modes and settings of the radio transceiver. ? bit 7 - pa_ext_en refer to section 11.5 ?rx/tx indicator? on page 147 . ? bit 6 - irq_2_ext_en the timing of a received frame can be determined by a separate pin. if register bit irq_2_ext_en is set to 1, the reception of a phr is directly issued on pin 10 (dig2), similar to interrupt irq_2 (rx_start). note that this pin is also active even if the corresponding interrupt event irq_2 (rx_start) mask bit in register 0x 0e (irq_mask) is set to 0. the pin remains at high level until the end of the frame receive procedure. for further details refer to section 11.6 ?rx frame time stamping? on page 150 . ? bit 5 - tx_auto_crc_on refer to section 8.2 ?frame check sequence (fcs)? on page 85 . ? bit 4 - rx_bl_ctrl refer to section 11.7 ?frame buffer empty indicator? on page 152 . ? bit [3:2] - spi_cmd_mode refer to section 6.3 ?radio transceiver status information? on page 24 . ? bit 1 - irq_mask_mode the at86rf231 supp orts polling of inte rrupt events. interrupt polling can be enabled by register bit irq_mask_mode. even if an interrupt request is masked by the corresponding bit in regis- ter 0x0e (irq_mask), the event is indica ted in register 0x0f (irq_status). bit 7 6 5 4 3 2 1 0 +0x04 pa_ext_en irq_2_ext_en tx_auto_crc_on rx_bl_ctrl spi _cmd_mode irq_mask_mode irq_polarity trx_ctrl_1 read/write r/w r/w r/w r/w r/w r/w r/w r/w reset value 0 0 1 0 0 0 0 0 table 6-10. interrupt polling configuration register bit value description irq_mask_mode 0 interrupt polling disabled 1 interrupt polling enabled
32 8111c?mcu wireless?09/09 at86rf231 ? bit 0 - irq_polarity the default polarity of the irq pin is active high . the polarity can be configured to active low via register bit irq_polarity, see table 6-11 on page 32 . this setting does not affect the polarity of the frame buffer empty indicator, refer to section 11.7 ?frame buffer empty indicator? on page 152 . the frame buffer empty indicator is always active high. table 6-11. configuration of pin 24 (irq) register bit value description irq_polarity 0 pin irq high active 1 pin irq low active
33 8111c?mcu wireless?09/09 at86rf231 7. operating modes 7.1 basic operating mode this section summarizes all states to provide the basic functionality of the at86rf231, such as receiving and transmitting frames, the power up sequence and sleep. the basic operating mode is designed for ieee 802.15.4 and ism applic ations; the corresponding radio transceiver states are shown in figure 7.1 on page 33 . figure 7-1. basic operating mode state diagram (for timing refer to table 7-1 on page 42 ) 7.1.1 state control the radio transceiver states are controlled ei ther by writing commands to register bits trx_cmd (register 0x02, trx_state), or direct ly by two signal pins: pin 11 (slp_tr) and 2 t r x _ o f f s l p _ t r = h s l p _ t r = l p l l _ o n rx_on pll_on trx_off (clock state) xosc=on pull=off r x _ o n p_on (power-on after v dd ) xosc=on pull=on sleep (sleep state) xosc=off pull=off (all states except p_on) force_trx_off (all states except sleep) shr detected frame end frame end busy_tx (transmit state) pll_on (pll state) tx_start or t r x _ o f f t r x _ o f f 1 3 4 5 7 6 8 9 11 10 rx_on_noclk (rx listen state) clkm=off sl p_t r = h s l p_ t r = l shr detected 12 13 /rst = h force_pll_on (all states except sleep, p_on, trx_off, rx_on_noclk) 14 slp_tr = h legend: blue : spi write to register trx_state (0x02) red : control signals via ic pin green : event basic operating mode states state transition number, see table 7-1 rx_on (rx listen state) busy_rx (receive state) reset (from all states) /rst = l x
34 8111c?mcu wireless?09/09 at86rf231 pin 8 (/rst). a successful state change can be verified by reading the radio transceiver status from register 0x01 (trx_status). if trx_status = 0x1f (state_transition_ in_progress) the at86rf231 is on a state transition. do not try to initiate a further state change while the radio transceiver is in state_transition_in_progress. pin slp_tr is a multifunctional pin, refer to section 6.5 ?sleep/wake-up and transmit signal (slp_tr)? on page 27 . dependent on the radio transceiver state, a rising edge of pin slp_tr causes the following state transitions: pin 8 (/rst) causes a reset of all registers (register bits clkm_ctrl are shadowed, for details refer to section 9.6.4 ?master clock signal output (clkm)? on page 117 ) and forces the radio transceiver into trx_off state. however, if the device was in p_on state it remains in the p_on state. for all states except sleep, the state change commands fo rce_trx_off or trx_off lead to a transition into trx_off state. if the radio transceiver is in active receive or transmit states (busy_*), the command force_trx_off interrupts these active processes, and forces an immediate transition to trx_off. in contrast a trx_off command is stored until an active state (receiving or transmitting) has been finished. after that the transition to trx_off is performed. for a fast transition from receive or active transmit states to pll_on state the command force_pll_on is provided. in contrast to force_trx_off this command does not disable the pll and the analog voltage regulator avreg. it is not available in states sleep, p_on, reset, trx_off, and all *_noclk states. the completion of each requested state change shall always be confirmed by reading the regis- ter bits trx_status (register 0x01, trx_status). 7.1.2 basic operating mode description 7.1.2.1 p_on - power-on after v dd when the external supply voltage (v dd ) is firstly applied to the at86rf231, the radio transceiver goes into the p_on stat e performing an on-c hip reset. the crystal osc illator is acti vated and the default 1 mhz master clock is provided at pin 17 (clkm) after the crystal oscillator has stabi- lized. clkm can be used as a clock source to the microcontroller. the spi interface and digital voltage regulator are enabled. the on-chip power-on-reset sets all registers to their default values. a dedicated reset signal from the microcontroller at pin 8 (/rst) is not necessary, but recommended for hardware / soft- ware synchronization reasons. ?trx_off sleep (level sensitive) ?rx_on rx_on_noclk (level sensitive) ? pll_on busy_tx whereas the falling edge of pin slp_tr causes the following state transitions: ? sleep trx_off (level sensitive) ? rx_on_noclk rx_on (level sensitive) ? ? ? ? ?
35 8111c?mcu wireless?09/09 at86rf231 all digital inputs are pulled-up or pulled-down during p_on state, refer to section 1.3.2 ?pull-up and pull-down configuration? on page 7 . this is necessary to support microcontrollers where gpio signals are floating after power on or reset. the input pull-up and pull-down circuitry is dis- abled when the radio transceiver leaves the p_ on state. output pins dig1/dig2 are pulled- down to digital ground, whereas pins dig3/dig4 are pulled-down to analog ground, unless their configuration is changed. prior to leaving p_on, the microcontroller must set the pins to the default operating values: slp_tr = l, /rst = h and /sel = h. all interrupts are disabled by default. thus, interrupts for state transition control are to be enabled first, e.g. enabl e irq_4 (awake_end) to indicate a state transition to trx_off state or interrupt irq_0 (pll_lock) to signal a locked pll in pll_on state. in p_on state a first access to the radio transceiver registers is possible after a default 1 mhz master clock is pro- vided at pin 17 (clkm), refer to table 7-1 on page 42 . once the supply vo ltage has stabilized and the crystal oscilla tor has settled (see section 12.5 ?general rf specifications? on page 158 , parameter 12.5.7), a valid spi write access to register bits trx_cmd (register 0x02, trx_state) with the command trx_off or force_trx_off initiate a state change from p_on towards trx_off state, which is then indicated by an awake_en d interrupt if enabled. 7.1.2.2 sleep - sleep state in sleep state, the entire radio transceiver is disabled. no circuitry is operating. the radio transceiver current consumption is reduced to leakage current only. this state can only be entered from state trx_off, by setting the pin slp_tr = h. if clkm is enabled, the sleep state is entered 35 clkm cycles after the rising edge at pin 11 (slp_tr). at that time clkm is turned off. if the clkm output is already turned off (bits clkm_ctrl = 0 in register 0x03), the sleep state is entered immedi ately. at clock rates 250 khz and 62.5 khz, the main clock at pin 17 (clkm) is turned off immediately. setting slp_tr = l returns the r adio transceiver to the trx_off state. during sleep the reg- ister contents remains valid while the content of the frame buffer and the security engine (aes) are cleared. /rst = l in sleep state returns the radio transceiver to trx_off state and thereby sets all registers to their default values. exceptions are register bits clkm_ctrl (register 0x03, trx_ctrl_0). these register bits require a specific treatment, for details see section 9.6.4 ?master clock signal output (clkm)? on page 117 . 7.1.2.3 trx_off - clock state in trx_off the crystal oscillator is running and the master clock is available at pin 17 (clkm) after the crystal oscillator has stabilized. the spi interface and digital voltage regulator are enabled, thus the radio transceiver registers, the frame buffer and security engine (aes) are accessible (see section 9.3 ?frame buffer? on page 107 and section 11.1 ?security module (aes)? on page 128 ). in contrast to p_on state the pull-up and pull-down configuration is disabled. pin 11 (slp_tr) and pin 8 (/rst) are available for state control. note that the analog front-end is disabled during trx_off.
36 8111c?mcu wireless?09/09 at86rf231 entering the trx_off state from p_on, sleep, or reset state is indicated by interrupt irq_4 (awake_end). 7.1.2.4 pll_on - pll state entering the pll_on state from trx_off state enables the analog voltage regulator (avreg) first. after the voltage regulator has been settled, the pll frequency synthesizer is enabled. when the pll has been settled at the receive frequency to a channel defined by register bits channel (register 0x08, phy_cc_cca), a succes sful pll lock is i ndicated by issuing an interrupt irq_0 (pll_lock). if an rx_on command is issued in pll_on state, the receiver is immediately enabled. if the pll has not been settled before the state change nevertheless takes place. even if the register bits trx_status (register 0x01, trx_status) indicates rx_on, actual frame reception can only start once the pll has locked. the pll_on state corresponds to the tx_on state in ieee 802.15.4. 7.1.2.5 rx_on and busy_rx - rx listen and receive state in rx_on state the receiver blocks and t he pll frequency synthesizer are enabled. the at86rf231 receive mode is internally separated into rx_on state and busy_rx state. there is no difference between these states with respect to the analog radio transceiver cir- cuitry, which are always turned on. in both states the receiver and the pll frequency synthesizer are enabled. during rx_on state the receiver listens for inco ming frames. after detecting a valid synchroni- zation header (shr), the at86rf231 automatically enters the busy_rx state. the reception of a valid phy header (phr) generates an irq_2 (rx_start) and receives and demodulates the psdu data. during psdu reception the frame data are stored continuously in the frame buffer until the last byte was received. the completion of the frame reception is indicated by an interrupt irq_3 (trx_end) and the radio transceiver reenters the state rx_on. at the same time the register bit rx_crc_valid (register 0x06, phy_rssi) is updated with the result of the fcs check (see section 8.2 ?frame check sequence (fcs)? on page 85 ). received frames are passed to the frame filtering unit, refer to section 7.2.3.5 ?frame filtering? on page 61 . if the content of the mac addressing fields (refer to ieee 802.15.4-2006, section 7.2.1) of a frame matches to the expected addresses, which is further dependent on the addressing mode, an address match interrupt irq_5 (ami) is issued, refer to section 6.6 ?inter- rupt logic? on page 29 . the expected address values are to be stored in registers 0x20 - 0x2b (short address, pan-id and ieee address). frame filtering is available in basic and extended operating mode, refer to section 7.2.3.5 ?frame filtering? on page 61 . leaving state rx_on is only possible by writ ing a state change command to register bits trx_cmd in register 0x02 (trx_state). 7.1.2.6 rx_on_noclk - rx listen state without clkm if the radio transceiver is listening for an incoming frame and the microcontroller is not running an application, the microcontroller may be pow ered down to decrease the total system power consumption. this specific power-down sce nario for systems runni ng in clock synchronous mode (see section 6. ?microcontroller interface? on page 16 ), is supported by the at86rf231 using the state rx_on_noclk.
37 8111c?mcu wireless?09/09 at86rf231 this state can only be entered by setting pin 11 (slp_tr) = h while the radio transceiver is in the rx_on state, refer to section 7.1.2.5 ?rx_on and busy_rx - rx listen and receive state? on page 36 . pin 17 (clkm) is disabled 35 clock cycles after the rising edge at the slp_tr pin, see figure 6-16 on page 28 . this allows the microcontr oller to complete its power- down sequence. note that for clkm clock rates 250 khz and 62.5 khz the master clock signal clkm is switched off immediately after rising edge of slp_tr. the reception of a frame shall be indicated to the microcontroller by an interrupt indicating the receive status. clkm is turned on again, and the radio transceiver enters the busy_rx state (see section 6.5 ?sleep/wake-up and transmit signal (slp_tr)? on page 27 and figure 6-16 on page 28 ). using this radio transceiver state it is essential to enable at least one interrupt indi- cating the reception status. otherwise the reception of a frame does not activate clkm and the microcontroller remains in its power-down mode. after the receive transaction has been completed, the radio transceiver enters the rx_on state. the radio transceiver only reenters the rx_on_noclk state, when the next rising edge of pin slp_tr pin occurs. if the at86rf231 is in the rx_on_noclk state, and pin slp_tr is reset to logic low, it enters the rx_on state, and it starts to supply clock on the clkm pin again. in states rx_on_noclk and rx_on, the radio transceiver current c onsumptions are equiva- lent. however, the rx_on_noclk current consum ption is reduced by the current required for driving pin 17 (clkm). note ? a reset in state rx_on_noclk re quires further to reset pin slp_tr to logic low, otherwise the radio transceiver enters directly the sleep state. 7.1.2.7 busy_tx - transmit state a transmission can only be initiated in state pll_on. there are two ways to start a transmission: ? rising edge of pin 11 (slp_tr) ? tx_start command to register bits trx_cmd (register 0x02, trx_state). either of these causes the radio transceiver into the busy_tx state. during the transition to busy_tx state, the pll frequency shifts to the transmit frequency. the actual transmission of the first data chip of the shr starts after 16 s to allow pll settling and pa ramp-up, see figure 7-6 on page 41 . after transmission of the shr, the frame buffer con- tent is transmitted. in case the phr indicates a frame length of zero, the transmission is aborted. after the frame transmission has completed, the at86rf231 automatically turns off the power amplifier, generates an irq_3 (trx_end) interrupt and returns into pll_on state. 7.1.2.8 reset state the reset state is used to se t back the state machine and to reset all registers of the at86rf231 to their default values, exception are register bits clkm_ctrl (register 0x03, trx_ctrl_0). these register bits require a specific treatment, for details see section 9.6.4 ?master clock signal output (clkm)? on page 117 .
38 8111c?mcu wireless?09/09 at86rf231 a reset forces the radio transceiver into trx_off state. if the devi ce is still in the p_on state it remains in the p_on state though. a reset is initiated with pin /rst = l and the state is left after setting /r st = h. the reset pulse should have a minimum length as specified in section 12.4 ?digital interface timing characteris- tics? on page 157 see parameter 12.4.13. during reset the microcontroller has to set the radio transceiver control pins slp_tr and /sel to their default values. an overview about the register reset values is provided in table 14-1 on page 170 . 7.1.3 interrupt handling all interrupts provided by the at86rf231 (see table 6-9 on page 29 ) are supported in basic operating mode. for example, interrupts are provided to observe the status of radio transceiver rx and tx operations. on receive irq_2 (rx_start) indicates the detection of a valid phr first, irq_5 (ami) an address match and irq_3 (trx_end) the completion of the frame reception. on transmit irq_3 (trx_end) indicates the completion of the frame transmission. figure 7-2 on page 39 shows an example for a transmit/receive transaction between two devices and the related interrupt events in basi c operating mode. device 1 transmits a frame containing a mac header (in this example of length 7), payload and valid fcs. the frame is received by device 2 which generates the interrupts during the processing of the incoming frame. the received frame is stored in the frame buffer. the first interrupt irq_2 (rx_start) signals the reception of a valid phr. if the received frame passes the address filter, refer to section 7.2.3.5 ?frame filtering? on page 61 , an address match interrupt irq_5 (ami) is issued after the reception of the mac header (mhr). in basic operating mode the third interrupt irq_3 (trx_end) is issued at the end of the received frame. in extended operating mode, refer to section 7.2 ?extended operating mode? on page 47 ; the interrupt is only issued if the receiv ed frame passes the address filter and the fcs is valid. further exceptions are explained in section 7.2 ?extended operating mode? on page 47 . processing delay t irq is a typical value, refer to section 12.4 ?digital interface timing character- istics? on page 157 .
39 8111c?mcu wireless?09/09 at86rf231 figure 7-2. timing of rx_start, ami and trx_end interrupts in basic operating mode 7.1.4 basic operating mode timing the following paragraphs depict state transitions and their timing properti es. timing figures are explained in table 7-1 on page 42 and section 12.4 ?digital interface timing characteristics? on page 157 . 7.1.4.1 power-on procedure the power-on procedure to p_on state is shown in figure 7-3 on page 39 . figure 7-3. power-on procedure to p_on state when the external supply voltage (v dd ) is firstly supplied to the at86rf231, the radio trans- ceiver enables the crystal oscillator (xosc) and the internal 1.8 v vo ltage regulator for the digital domain (dvreg). after t tr1 = 330 s (typ.), the master clock signal is available at pin 17 (clkm) at default rate of 1 mhz. if clkm is available the spi is already enabled and can be used to control the transceiver. as long as no state change towards state trx_off is per- formed the radio transceiver remains in p_on state. 128 160 192 0 192+(9+ m )*32 -16 time [s] rx (device 2) irq_2 (rx_start) rx_on rx_on irq trx_state interrupt latency trx_end irq_5 (ami) t irq busy_rx irq_3 (trx_end) tx (device1) pll_on busy_tx pll_on irq slp_tr trx_state typ. processing delay 16 s frame on air preamble sfd phr msdu 41 1 m number of octets frame content mhr 7 fcs 2 t irq t irq 0 event state v dd on p_on block xosc, dvreg 100 clkm on 400 time [s] time t tr1
40 8111c?mcu wireless?09/09 at86rf231 7.1.4.2 wake-up procedure the wake-up proced ure from sleep state is shown in figure 7-4 on page 40 . figure 7-4. wake-up procedure from sleep state the radio transcei vers sleep state is le ft by releasing pin slp_tr to logic low. this restarts the xosc and dvreg. after t tr2 = 380 s (typ.) the radio transceiver enters trx_off state. the internal clock signal is available and provid ed to pin 17 (clkm), if clkm was enabled. this procedure is similar to the power-on procedure. however the radio transceiver continues the state change automatically to the trx_off state. during this the filter-tuning network (ftn) calibration is performed. ente ring trx_off state is signaled by irq_4 (awake_end), if this interrupt was enabled by the appropriate mask register bit. 7.1.4.3 pll_on and rx_on states the transition from trx_off to pll_on and rx_on mode is shown in figure 7-5 on page 40 . figure 7-5. transmission from trx_off to pll_on and rx_on state note: if trx_cmd = rx_on in trx_off state rx_on state is entered immediately, even if the pll has not settled. in trx_off state, entering the commands pll_on or rx_on initiates a ramp-up sequence of the internal 1.8v voltage regulator for the analog domain (avreg). rx_on state can be entered any time from pll_on state regardless whether the pll has already locked, which is indicated by irq_0 (pll_lock). 0 event state block 100 clkm on 400 time [s] time t tr2 trx_off irq_4 (awake_end) slp_tr = l sleep 200 xosc, dvreg xosc, dvreg ftn 0 event state block 100 time [s] time t tr4 irq_0 (pll_lock) trx_off avreg command pll_on pll rx pll_on r_on t tr8 rx_on
41 8111c?mcu wireless?09/09 at86rf231 7.1.4.4 busy_tx and rx_on states the transition from pll_on to busy_tx stat e and subsequent to rx_on state is shown in figure 7-6 on page 41 . figure 7-6. pll_on to busy_tx to rx_on timing starting from pll_on state it is further assumed that the pll is already locked. a transmission is initiated either by a rising edge of pin 11 (slp_tr) or by command tx_start. the pll set- tles to the transmit frequency and the pa is enabled. t tr10 = 16 s after initiating the transmission the at86rf231 changes into busy_tx state and the internally generated shr is transmitted. after that the psdu data are transmitted from the frame buffer. after completing the frame transmission, indicated by irq_3 (trx_end), the pll settles back to the receive frequency within t tr11 = 32 s in state pll_on. if during tx_busy the radio transmitter is programmed to change to a receive state it automati- cally proceeds the state change to rx_on state after finishing the transmission. 7.1.4.5 reset procedure the radio transceiver reset procedure is shown in figure 7-7 on page 41 . figure 7-7. reset procedure note: timing figure t tr13 refers to table 7-1 on page 42 , t 10 , t 11 refers to section 12.4 ?digital interface timing characteristics? on page 157 . time [s] 0x 16 x + 32 time t tr11 t tr10 command rx_on state block pll_on rx_on busy_tx pin slp_tr pa pll pa, tx rx pll or command tx_start x event state block time [s] pin /rst trx_off x + 40 [ irq_4 (awake_end) ] 0 various time >t10 t tr13 >t11 xosc, dvreg xosc, dvreg x + 10 ftn
42 8111c?mcu wireless?09/09 at86rf231 /rst = l sets all registers to their default values. exceptions are register bits clkm_ctrl (reg- ister 0x03, trx_ctrl_0), refer to section 9.6.4 ?master clock signal output (clkm)? on page 117 . after releasing the reset pin (/rst = h) the wake-up sequence including an ftn calibration cycle is performed, refer to section 9.8 ?automatic filter tuning (ftn)? on page 125 . after that the trx_off state is entered. figure 7-7 on page 41 illustrates the reset proc edure once the p_on state was left and the radio transceiver was not in sleep state. the reset procedure is identical for all originating radio transceiver states except of state p_on and sleep state. instead, here the procedure described in section 7.1.2.1 ?p_on - power-on after vdd? on page 34 must be followed to enter the trx_off state. if the radio transceiver was in sleep state, the xosc and dvreg are enabled before entering trx_off state. if register trx_status indicates state_ transition_in_progress during system initial- ization until the at86rf231 reaches trx_off, do not try to initiate a further state change while the radio transceiver is in this state. notes ? the reset impulse should have a minimum length t 10 = 625 ns as specified in section 12.4 ?digital interface timing characteristics? on page 157 , see parameter 12.4.13. ? an access to the device should not occur earlier than t 11 625 ns after releasing the pin /rst; refer to section 12.4 ?digital interface timing characteristics? on page 157 , parameter 12.4.14. ? a reset overrides an spi command request that might be queued. 7.1.4.6 state transition timing summary the transition numbers correspond to figure 7-1 on page 33 and do not include spi access time if not otherwise stated. see measurement setup in figure 5-1 on page 12 . table 7-1. state transition timing no symbol transition time [s], (type) comments 1t tr1 p_on until clkm available 330 depends on external capacitor at dvdd (1 f nom) and crystal oscillator setup (cl = 10 pf) 2t tr2 sleep trx_off 380 depends on external capacitor at dvdd (1 f nom) and crystal oscillator setup (cl = 10 pf) trx_off state indicated by irq_4 (awake_end) 3t tr3 trx_off sleep 35*1/f clkm for f clkm > 250 khz 4 t tr4 trx_off pll_on 110 depends on external capacitor at avdd (1 f nom) 5t tr5 pll_on trx_off 1 6t tr6 trx_off rx_on 110 depends on external capacitor at avdd (1 f nom) 7t tr7 rx_on trx_off 1 8t tr8 pll_on rx_on 1 9t tr9 rx_on pll_on 1 transition time is also valid for tx_aret_on, rx_aack_on ? ? ? ? ? ? ? ? ?
43 8111c?mcu wireless?09/09 at86rf231 the state transition timing is calculated based on the timing of the individual blocks shown in figure 7-3 on page 39 to figure 7-7 on page 41 . the worst case values include maximum oper- ating temperature, minimum supply voltage, and device parameter variations. 10 t tr10 pll_on busy_tx 16 when asserting pin 11 (slp_tr) or trx_cmd = tx_start first symbol transmission is delayed by 16 s delay (pll settling and pa ramp up) 11 t tr11 busy_tx pll_on 32 pll settling time from tx_busy to pll_on state 12 t tr12 all states trx_off 1 using trx_cmd = force_trx_off (see register 0x02, trx_state), not valid for sleep state 13 t tr13 reset trx_off 37 valid for p_on or sleep state 14 t tr14 various states pll_on 1 using trx_cmd = force_pll_on (see register 0x02, trx_state), not valid for sleep, p_on, reset, trx_off and *_noclk table 7-1. state transition timing (continued) no symbol transition time [s], (type) comments ? ? ? ? ? table 7-2. analog block initialization and settling time no symbol block time [s], (type) time [s], (max) comment 15 t tr15 xosc 330 1000 leaving sleep state, depends on crystal q factor and load capacitor 16 t tr16 ftn 25 ftn tuning time fixed 17 t tr17 dvreg 60 1000 depends on external bypass capacitor at dvdd (cb3 = 1 f nom., 10 f worst case), depends on v dd 18 t tr18 avreg 60 1000 depends on external bypass capacitor at avdd (cb1 = 1 f nom, 10 f worst case), depends on v dd 19 t tr19 pll, initial 110 155 pll settling time trx_off pll_on, including 60 s avreg settling time 20 t tr20 pll settling 11 24 settling time between channels switch 21 t tr21 pll, cf cal 35 pll center frequency calibration, refer to section 9.7.4 22 t tr22 pll, dcu cal 6 pll dcu calibration, refer to section 9.7.4 23 t tr23 pll, rx tx 16 maximum pll settling time rx tx 24 t tr24 pll, tx rx 32 maximum pll settling time tx rx 25 t tr25 rssi, update 2 rssi update period in receive states, refer to section 8.3.2 26 t tr26 ed 140 ed measurement period, refer to section 8.4.2 27 t tr27 shr, sync 96 typical shr synchronisation period, refer to section 8.4.2 28 t tr28 cca 140 cca measurement period, refer to section 8.5.2 29 t tr29 random value 1 random value update period, refer to section 11.2.1 ? ? ? ? ?
44 8111c?mcu wireless?09/09 at86rf231 7.1.5 register description register 0x01 (trx_status): a read access to trx_status register signals the current radio transceiver state. a state change is initiated by writing a state transition command to register bits trx_cmd (register 0x02, trx_state). alternatively a state transition can be initiated by the rising edge of pin 11 (slp_tr) in the appropriate state. this register is used for basic and extended operating mode, refer to section 7.2 ?extended operating mode? on page 47 . ? bit 7 - cca_done refer to section 8.5 ?clear channel assessment (cca)? on page 94 . ? bit 6 - cca_status refer to section 8.5 ?clear channel assessment (cca)? on page 94 . ? bit 5 - reserved ? bit [4:0] - trx_status the register bits trx_status signals the current radio transceiver status. if the requested state transition is not completed yet, the trx_status returns state_transition_in_progress. do not try to initiate a further state chan ge while the radio transceiver is in stat e_transition_in_progress. st ate transition timings are defined in table 7-1 on page 42 . bit 7 6 5 4 3 2 1 0 +0x01 cca_done cca_status reserved trx_status trx_status read/write r r r r r r r r reset value 0 0 0 0 0 0 0 0
45 8111c?mcu wireless?09/09 at86rf231 notes: 1. extended operating mode only, refers to section 7.2 ?extended o perating mode? on page 47 . 2. do not try to initiate a further state change while the radio transceiver is in state_transition_in_progress state. 3. in sleep state register not accessible. table 7-3. radio transceiver status, register bits trx_status register bits value state description trx_status 0x00 p_on 0x01 busy_rx 0x02 busy_tx 0x06 rx_on 0x08 trx_off (clk mode) 0x09 pll_on (tx_on) 0x0f (3) sleep 0x11 (1) busy_rx_aack 0x12 (1) busy_tx_aret 0x16 (1) rx_aack_on 0x19 (1) tx_aret_on 0x1c rx_on_noclk 0x1d (1) rx_aack_on_noclk 0x1e (1) busy_rx_aack_noclk 0x1f (2) state_transition_in_progress all other values are reserved
46 8111c?mcu wireless?09/09 at86rf231 register 0x02 (trx_state): the radio transceiver states are controlled via r egister bits trx_cmd, which receives the state transition commands. this register is used for basic and extended operating mode, refer to section 7.2 ?extended operating mode? on page 47 . ? bit [7:5] - trac_status refer to section 7.2.7 ?register description - control registers? on page 68 . ? bit [4:0] - trx_cmd a write access to register bits trx_cmd initiate a radio transceiver state transition towards the new state as defined by the write access: notes: 1. force_pll_on is not valid for states sleep, p_on, reset, trx_off, and all *_noclk states, as well as state_transition_in_progress towards these states. 2. extended operating mode only, refers to section 7.2.7 ?register description - control regis- ters? on page 68 . b i t 76 5 43210 +0x02 trac_status trx_cmd trx_state read/write r r r r/w r/w r/w r/w r/w reset value 0 0 0 0 0 0 0 0 table 7-4. state control command, register bits trx_cmd register bit value state description trx_cmd 0x00 nop 0x02 tx_start 0x03 force_trx_off 0x04 (1) force_pll_on 0x06 rx_on 0x08 trx_off (clk mode) 0x09 pll_on (tx_on) 0x16 (2) rx_aack_on 0x19 (2) tx_aret_on all other values are reserved and mapped to nop
47 8111c?mcu wireless?09/09 at86rf231 7.2 extended o perating mode the extended operating mode is a hardware mac accelerator and goes beyond the basic radio transceiver functionality provided by the basic operating mode. it handles time critical mac tasks, requested by the ieee 802.15.4 standard, by hardware, such as automatic acknowledge- ment, automatic csma-ca and retransmission. th is results in a more efficient ieee 802.15.4 software mac implementation including reduced code size and may allow the use of a smaller microcontroller or to operate at low clock rates. the extended operating mode is designed to support ieee 802.15.4-2006 compliant frames; the mode is backward compatible to ieee 802.15.4-2003 and supports non ieee 802.15.4 com- pliant frames. this mode comprises the following procedures: automatic acknowledgement (rx_ aack) divides into the tasks: ? frame reception and automatic fcs check ? configurable addressing fields check ? interrupt indicating address match ? interrupt indicating frame reception, if it passes address filtering and fcs check ? automatic ack frame transmission (if the received frame passed the address filter and fcs check and if an ack is required by the frame type and ack request) ? support of slotted acknowledgment using slp_tr pin automatic csma-ca and retransmission (tx_aret) divides into the tasks: ? csma-ca including automatic cca retry and random back-off ? frame transmission and automatic fcs field generation ? reception of ack frame (if an ack was requested) ? automatic frame retry if ack was expected but not received ? interrupt signaling with transaction status automatic fcs check and generation, refer to section 8.2 ?frame check sequence (fcs)? on page 85 , is used by the rx_aack and tx_aret modes. in rx_aack mode, an automatic fcs check is always performed for incoming frames. in tx_aret mode, an ack, received within the time required by ieee 802.15.4, is accepted if the fcs is valid, and if the sequence number of the ack matches the sequence number of the previously transmitted frame. dependent on the value of the frame pending subfield in the received acknowledgement frame the transaction status is set, see table 7-16 on page 70 . an at86rf231 state diagram including the extended operating mode states is shown in figure 7-8 on page 48 . yellow marked states represent the basic operating mode; blue marked states represent the extended operating mode.
48 8111c?mcu wireless?09/09 at86rf231 figure 7-8. extended operating mode state diagram 2 t r x _ o f f s l p _ t r =h legend: blue : spi write to register trx_state (0x02) red : control signals via ic pin green : event basic operating mode states extended operating mode states s l p _ t r =l p l l _ o n rx_on pll_on trx_off (clock state) xosc=on pull=off r x _ o n p_on (power-on after v dd ) xosc=on pull=on sleep (sleep state) xosc=off pull=off (all modes except p_on) force_trx_off (all modes except sleep) frame end frame end busy_tx (transmit state) rx_on (rx listen state) busy_rx (receive state) t r x _ o f f t r x _ o f f 1 3 4 5 7 6 8 9 10 11 rx_on_noclk (rx listen state) clkm=off s l p _ t r = h sl p_ t r=l busy_rx_aack busy_tx_aret shr detected trans- action finished tx_aret_on pll_on slp_tr=h or tx_start frame end p l l_ o n r x _ a a c k _ o n rx_aack_ on_noclk busy_rx_ aack_noclk frame rejected frame accepted t x _ a r e t _ o n rx _ aa c k _ o n from / to trx_off from / to trx_off slp_tr=h slp_tr=l /rst = h 12 13 force_pll_on 14 shr detected slp_tr=h or tx_start shr detected shr detected tx_aret_on rx_aack_on clkm=off clkm=off pll_on (pll state) see notes reset (from all states) /rst = l t rx _ o f f t r x _ o f f
49 8111c?mcu wireless?09/09 at86rf231 7.2.1 state control the extended operating mode states rx_aack and tx_aret are controlled via register bits trx_cmd (register 0x02, trx_state), which receives the state transition commands. the states are enter ed from trx_off or pll_on state as illustrated by figure 7-8 on page 48 . the completion of each state change command shall always be confirmed by reading the register 0x01 (trx_status). rx_aack - receive with automatic ack a state transition to rx_aack_on from pll_on or trx_off is initiated by writing the com- mand rx_aack_on to the register bits trx_cmd. the state change can be confirmed by reading register 0x01 (trx_status), thos e changes to rx_aack_on or busy_rx_aack on success. the latter one is returned if a frame is currently about being received. the rx_aack state is left by writing command trx_off or pll_on to the register bits trx_cmd. if the at86rf231 is within a frame receive or acknowledgment procedure (busy_rx_aack) the state change is executed after finish. alternatively, the commands force_trx_off or force_pll_on can be used to cancel the rx_aack transaction and change into radio transceiver state trx_off or pll_on, respectively. tx_aret - transmit with automatic retry and csma-ca retry similarly, a state transition to tx_aret_on fr om pll_on or trx_off is initiated by writing command tx_aret_on to register bits trx_cmd. the radio transceiver is in the tx_aret_on state after trx_status (register 0x01) changes to tx_aret_on. the tx_aret transaction is started with a rising edge of pin 11 (slp_tr) or writing the command tx_start to register bits trx_cmd. the tx_aret state is left by writing the co mmand trx_off or pll_on to the register bits trx_cmd. if the at86rf231 is within a csma-ca, a frame-transmit or an acknowledgment procedure (busy_tx_aret) the state change is executed after finish. alternatively the com- mand force_trx_off or force_pll_on can be used to instantly terminate the tx_aret transaction and change into radio transceiver state trx_off or pll_on, respectively. note ? a state change request from trx_off to rx_aack_ on or tx_aret_on internally passes the state pll_on to initiate the radio transceiver. thus t he readiness to receive or transmit data is delayed accordingly. it is recommended to use in terrupt irq_0 (pll_lock) as an indicator.
50 8111c?mcu wireless?09/09 at86rf231 7.2.2 configuration the use of the extended operating mode is based on basic operating mode functionality. only features beyond the basic radio transceiver functi onality are described in the following sections. for details on the basic operating mode refer to section 7.1 ?basic operating mode? on page 33 . when using the rx_aack or tx_aret modes, the following registers needs to be configured. rx_aack configuration steps: the addresses for the address match algorithm are to be stored in the appropriate address reg- isters. additional control of the rx_aack mode is done with register 0x17 (xah_ctrl_1) and register 0x2e (csma_seed_1). as long as a short address has not been set, onl y broadcast frames and frames matching the ieee address can be received. configuration examples for different device operating modes and handling of various frame types can be found in section 7.2.3.1 ?description of rx_aack configuration bits? on page 54 . tx_aret configuration steps: max_frame_retries (register 0x2c) defines the maximum number of frame retransmissions. the register bits max_csma_retries (register 0x2c) configure the number of csma-ca retries after a busy ch annel is detected. ? short address, pan- id and ieee address registers 0x20 - 0x2b ? configure rx_aack properties registers 0x2c, 0x2e ? handling of frame version subfield ? handling of pending data indicator ? characterize as pan coordinator ? handling of slotted acknowledgement ? additional frame filtering properties registers 0x17, 0x2e ? promiscuous mode ? enable or disable automatic ack generation ? handling of reserved frame types ? leave register bit tx_auto_crc _on = 1 register 0x04, trx_ctrl_1 ? configure csma-ca ? max_frame_retries register 0x2c, xah_ctrl_0 ? max_csma_retries register 0x2c, xah_ctrl_0 ? csma_seed registers 0x2d, 0x2e ? max_be, min_be register 0x2f, csma_be ? configure cca (see section 8.5 )
51 8111c?mcu wireless?09/09 at86rf231 the csma_seed_0 and csma_seed_1 register bits (registers 0x2d, 0x 2e) define a random seed for the back-off-time random-number generator in the at86rf231. the max_be and min_be register bits (regis ter 0x2f) sets the maximum and minimum csma back-off exponent (according to [1] ). 7.2.3 rx_aack_on - receive with automatic ack the general functionality of the rx_aack procedure is shown in figure 7-9 on page 53 . the gray shaded area is the standard flow of an rx_aack transaction for ieee 802.15.4 com- pliant frames, refer section 7.2.3.2 ?configuration of ieee scenarios? on page 55 . all other procedures are exceptions for specific operating modes or frame formats, refer to section 7.2.3.3 ?configuration of non ieee 802. 15.4 compliant sce narios? on page 58 . the frame filtering operations is described in detail in section 7.2.3.5 ?frame filtering? on page 61 . in rx_aack_on state, the radio transceiver listens for incoming frames. after detecting a valid phr, the radio transceiver parses the frame content of the mac header (mhr), refer to section 8.1.2 ?mac protocol layer data unit (mpdu)? on page 80 . generally, at nodes, configured as a normal device or pan coordinator, a frame is not indicated if the frame filter does not match and the fcs is invalid. otherwise, the interrupt irq_3 (trx_end) is issued after the completion of the frame reception. the microcontroller can then read the frame. an exception applies if promiscuous mode is enabled; see section 7.2.3.2 ?con- figuration of ieee scenarios? on page 55 , in that case an irq_3 (trx_end) interrupt is issued, even if the fcs fails. if the content of the mac addressing fields of the received frame (refer to ieee 802.15.4 section 7.2.1) matches one of the configured addresses, dependent on the addressing mode, an address match interrupt irq_5 (ami) is issued, refer to section 7.2.3.5 ?frame filtering? on page 61 . the expected address values are to be stor ed in registers 0x20 - 0x2b (short address, pan-id and ieee address). frame filtering as described in section 7.2.3.5 ?frame filtering? on page 61 is also valid for basic operating mode. during reception the at86rf231 parses bit [5] (ack request) of the frame control field of the received data or mac command frame to check if an ack reply is expected. in that case and if the frame passes the third level of filtering, see ieee 802.15.4-2006, section 7.5.6.2, the radio transceiver automatically generates and transmits an ack frame. the content of the frame pending subfield of the ack response is set by register bit aack_set_pd (register 0x 2e, csma_seed_1) when the ack frame is sent in response to a data request mac command frame, otherwise this subfield is set to 0. the sequence number is copied from the received frame. optionally, the start of the transmission of the acknowledgement frame can be influenced by register bit aack_ack_time. default value (according to standard ieee 802.15.4) is 12 sym- bol times after the reception of the last symbol of a data or mac command frame. if the register bit aack_dis_ack (register 0x2e, csma_seed_1) is set, no acknowledgement frame is sent even if an acknowledgment frame was requested. this is useful for operating the mac hardware accelerator in promiscuous mode, see section 7.2.3.2 ?configuration of ieee scenarios? on page 55 .
52 8111c?mcu wireless?09/09 at86rf231 the status of the rx_aack operation is indica ted by register bits trac_status (register 0x02, trac_status), see section 7.2.7 ?register description - control registers? on page 68 . during the operations described above the at86rf231 remains in busy_rx_aack state.
53 8111c?mcu wireless?09/09 at86rf231 figure 7-9. flow diagram of rx_aack reserved frames trx_state = rx_aack_on shr detected trx_state = busy_rx_aack scanning mhr frame reception frame filtering ack requested (see note 3) wait 12 symbol periods transmit ack trx_state = rx_aack_on n y n y generate irq_2 (rx_start) aack_prom_mode == 1 generate irq_5 (ami) y generate irq_3 (trx_end) frame reception note 3: additional conditions: - ack requested & - ack_dis_ack==0 & - frame_version<=aack_fvn_mode slotted operation == 0 y aack_ack_time == 0 y wait 2 symbol periods wait 6 symbol periods pin 11 (slp_tr) rising edge n n generate irq_3 (trx_end) n y n aack_ack_time == 0 y wait 2 symbol periods n fcs valid (see note 2) y n aack_upld_res_ft == 1 fcs valid generate irq_3 (trx_end) y y n n n note 2: fcs check is omitted for promiscous mode fcf[2:0] > 3 n y y promiscuous mode note 1: address match, promiscuous mode and reserved frames: - a radio transceiver in promiscuous mode, or configured to receive reserved frames handles received frames passing the third level of filtering - for details refer to the description of promiscuous mode and reserved frame types (see note 1)
54 8111c?mcu wireless?09/09 at86rf231 7.2.3.1 description of rx_aack configuration bits overview table 7-5 on page 54 summarizes all register bits which affect the behavior of an rx_aack transaction. for address filtering it is further required to setup address registers to match to the expected address. configuration and address bits are to be set in trx_off or pll_on state prior to switching to rx_aack mode. a graphical representation of variou s operating modes is illustrated in figure 7-9 on page 53 . the usage of the rx_aack configuration bits for various operating modes of a node is explained in the following sections. configuration bits not mentioned in the following two sec- tions should be set to their reset values according to table 14-1 on page 170 . all registers mentioned in table 7-5 on page 54 are described in section 7.2.6 ?register sum- mary? on page 68 . note, that the general behavior of the "at86rf231 extended feature set", section 11. ?at86rf231 extended feature set? on page 128 , settings: table 7-5. overview of rx_aack configuration bits register register register name description address bits 0x20,0x21 0x22,0x23 0x24 ........... 0x2b short_addr_0/1 pan_addr_0/1 ieee_addr_0 ........ ieee_addr_7 set node addresses 0x0c 7 rx_safe_mode protect buffer after frame receive 0x17 1 aack_prom_mode support promiscuous mode 0x17 2 aack_ack_time change auto acknowledge start time 0x17 4 aack_upld_res_ft enable reserved frame type reception, needed to receive non-standard compliant frames 0x17 5 aack_fltr_res_ft filter reserved frame types like data frame type, needed for filtering of non-standard compliant frames 0x2c 0 slotted_operation if set, acknowledgment transmission has to be triggered by pin 11 (slp_tr) 0x2e 3 aack_i_am_coord if set, the device is a pan coordinator 0x2e 4 aack_dis_ack disable generation of acknowledgment 0x2e 5 aack_set_pd set frame pending subfield in frame control field (fcf), refer to section 8.1.2.2 0x2e 7:6 aack_fvn_mode controls the ack behavior, depending on fcf frame version number
55 8111c?mcu wireless?09/09 at86rf231 are completely independent from rx_aack mode. each of these operating modes can be com- bined with the rx_aack mode. 7.2.3.2 configuration of ieee scenarios normal device table 7-6 on page 55 shows a typical rx_aack configurat ion of an ieee 802.15.4 device oper- ating as a normal device, rather than a pan coordinator or router. notes ? if no short address has been configured before the device has been assigned one by the pan-coordinator, only frames directed to either the broadcas t address or the ieee address are received. ? in ieee 802.15.4-2003 standard the frame version subfield did not yet exist but was marked as reserved. according to this standard, reserved fields have to be set to zero. on the other hand, ieee 802.15.4-2003 standard requires ignoring reserved bits upon reception. thus, there is a contradiction in the standard which can be interpreted in two ways: ? oqpsk_data_rate (psdu data rate) ? sfd_value (alternative sfd value) ? ant_div (antenna diversity) ? rx_pdt_level (blocking frame reception of lower power signals) table 7-6. configuration of i eee 802.15.4 devices register register regi ster name description address bits 0x20,0x21 0x22,0x23 0x24, ........... 0x2b short_addr_0/1 pan_addr_0/1 ieee_addr_0 ........ ieee_addr_7 set node addresses 0x0c 7 rx_safe_mode 0 : disable frame protection 1 : enable frame protection 0x2c 0 slotted_operation 0 : if transceiver works in unslotted mode 1 : if transceiver works in slotted mode 0x2e 7:6 aack_fvn_mode controls the ack behavior, depending on fcf frame version number 0x00 : acknowledges only frames with version number 0, i.e. accord ing to ieee 802.15.4-2003 frames 0x01 : acknowledges only frames with version number 0 or 1, i.e. fr ames according to ieee 802.15.4-2006 0x10 : acknowledges only frames with version number 0 or 1 or 2 0x11 : acknowledges all frames, independent of the fcf frame version number
56 8111c?mcu wireless?09/09 at86rf231 the same holds for pan coordinators, see table 7-7 on page 56 . pan-coordinator promiscuous mode the promiscuous mode is describe d in ieee 802.15 .4-2006, section 7.5.6. 2. this mode is fur- ther illustrated in figure 7-9 on page 53 . according to ieee 802.15.4-2006 when in promiscuous mode, the mac sub layer shall pass received frames with correct fcs to the next higher layer and shall not be processed further. that implies that frames should never be acknowledged. 1. if a network should only allow access to nodes which use the ieee 802.15.4-2003, then aack_fvn_mode should be set to 0. 2. if a device should acknowledge all frames independent of its frame version, aack_fvn_mode should be set to 3. howe ver, this can result in conflicts with co-existing ieee 802.15.4-2006 standard compliant networks. table 7-7. configuration of a pan coordinator register register register name description address bits 0x20,0x21 0x22,0x23 0x24, ........... 0x2b short_addr_0/1 pan_addr_0/1 ieee_addr_0 ........ ieee_addr_7 set node addresses 0x0c 7 rx_safe_mode 0 : disable frame protection 1 : enable frame protection 0x2c 0 slotted_operation 0 : if transceiver works in unslotted mode 1 : if transceiver works in slotted mode 0x2e 3 aack_i_am_coord 1 : device is pan coordinator 0x2e 5 aack_set_pd 0 : frame pending subfield is not set in fc 1 : frame pending subfield is set in fcf 0x2e 7:6 aack_fvn_mode controls the ack behavior, depending on fcf frame version number 0x00 : acknowledges only frames with version number 0, i.e. according to ieee 802.15.4-2003 frames 0x01 : acknowledges only frames with version number 0 or 1, i.e. frames according to ieee 802.15.4-2006 0x10 : acknowledges only frames with version number 0 or 1 or 2 0x11 : acknowledges all frames, independent of the fcf frame version number
57 8111c?mcu wireless?09/09 at86rf231 only second level filter rules as defined by ieee 802.15.4-2006, section 7.5.6.2, are applied to the received frame. table 7-8 on page 57 shows the typical configuration of a device operating promiscuous mode. if the radio transceiver is in promiscuous mode, second level of filtering according to ieee 802.15.4-2006, section 7.5.6.2, is applied to a received frame. however, an irq_3 (trx_end) is issued even if the fcs is invalid. thus, it is necessary to read register bit rx_crc_valid (register 0x06, phy_rssi) afte r irq_3 (trx_end) in order to verify the reception of a frame with a valid fcs. if a device, operating in promiscuous mode, receives a frame with a valid fcs which further passed the third level of filtering according to ieee 802.15.4-2006, section 7.5.6.2, an acknowl- edgement frame would be transmitted. according to the definition of the promiscuous mode a received frame shall not be acknowledged, even if it is requested. thus register bit aack_dis_ack (register 0x2e, cs ma_seed_1) has to be set to 1. in all receive modes an irq_5 (ami) interrupt is issued, when the received frame matches the node's address according to the filter rules described in section 7.2.3.5 ?frame filtering? on page 61 alternatively, in basic operating mode rx_on state, when a valid phr is detected, an irq_2 (rx_start) is generated and the frame is received. the end of the frame reception is signal- ized with an irq_3 (trx_end). at the same time the register bit rx_crc_valid (register 0x06, phy_rssi) is updated with the result of the fcs check (see section 8.2 ?frame check sequence (fcs)? on page 85 ). according to the promiscuous mode definition the rx_crc_valid bit needs to be checked in order to dismiss corrupted frames. table 7-8. configuration of promiscuous mode register register register name description address bits 0x20,0x21 0x22,0x23 0x24, ... 0x2b short_addr_0/1 pan_addr_0/1 ieee_addr_0 ... ieee_addr_7 address shall be set: 0x00 0x17 1 aack_prom_mode 1 : enable promiscuous mode 0x2e 4 aack_dis_ack 1 : disable generation of acknowledgment 0x2e 7:6 aack_fvn_mode controls the ack behavior, depending on fcf frame version number 0x00 : acknowledges only frames with version number 0, i.e. according to ieee 802.15.4-2003 frames 0x01 : acknowledges only frames with version number 0 or 1, i.e. frames according to ieee 802.15.4-2006 0x10 : acknowledges only frames with version number 0 or 1 or 2 0x11 : acknowledges all frames, independent of the fcf frame version number
58 8111c?mcu wireless?09/09 at86rf231 7.2.3.3 configuration of non i eee 802.15.4 compliant scenarios sniffer table 7-9 on page 58 shows an rx_aack configuration to setup a sniffer device. other rx_aack configuration bits, refer to table 7-5 on page 54 , should be set to their reset values. all frames received are indicated by an ir q_2 (rx_start) and irq_3 (trx_end). after frame reception regist er bit rx_crc_valid (register 0x06 , phy_rssi) is updated with the result of the fcs check (see section 8.2 ?frame check sequence (fcs)? on page 85 ). the rx_crc_valid bit needs to be checked in order to dismiss corrupted frames. this operating mode is sim ilar to the promiscuous mode. reception of reserved frames in rx_aack mode, frames with reserved frame types, refer to section 8.1.2.2 ?frame control field (fcf)? on page 80 , can also be handled. this might be required when implementing propri- etary, non-standard compliant, protocols. it is an extension of the address filtering in rx_aack mode. received frames are either handled similar to data frames, or may be allowed to com- pletely bypass the address filter. table 7-10 on page 58 shows the required configuration for a node to receive reserved frames, figure 7-9 on page 53 shows the corresponding flow chart. table 7-9. configuration of a sniffer device register register register name description address bits 0x17 1 aack_prom_mode 1 : enable promiscuous mode 0x2e 4 aack_dis_ack 1 : disable generation of acknowledgment table 7-10. rx_aack configuration to receive reserved frame types register register register name description address bits 0x20,0x21 0x22,0x23 0x24, ........... 0x2b short_addr_0/1 pan_addr_0/1 ieee_addr_0 ........ ieee_addr_7 set node addresses 0x0c 7 rx_safe_mode 0 : disable frame protection 1 : enable frame protection 0x17 4 aack_upld_res_ft 1 : enable reserved frame type reception 0x17 5 aack_fltr_res_ft filter reserved frame types like data frame type, see note below 0 : disable 1 : enable 0x2c 0 slotted_operation 0 : if transceiver works in unslotted mode 1 : if transceiver works in slotted mode
59 8111c?mcu wireless?09/09 at86rf231 there are two different options for handling reserved frame types. short acknowledgment frame (ack) start timing register bit aack_ack_time (register 0x17, xah_ctrl_1), see table 7-11 on page 60 , defines the symbol time between frame rec eption and transmission of an acknowledgment frame. 0x2e 3 aack_i_am_coord 0 : device is not pan coordinator 1 : device is pan coordinator 0x2e 4 aack_dis_ack 0 : enable generation of acknowledgment 1 : disable generation of acknowledgment 0x2e 7:6 aack_fvn_mode controls the ack behavior, depending on fcf frame version number 0x00 : acknowledges only frames with version number 0, i.e. according to ieee 802.15.4-2003 frames 0x01 : acknowledges only frames with version number 0 or 1, i.e. frames according to ieee 802.15.4-2006 0x10 : acknowledges only frames with version number 0 or 1 or 2 0x11 : acknowledges all frames, independent of the fcf frame version number 1. aack_upld_res_ft = 1, aack_flt_res_ft = 0: any non-corrupted frame with a reserved frame type is indicated by an irq_3 (trx_end) interrupt. no further address filtering is applied on those frames. an irq_5 (ami) interrupt is never generated and the acknowledgment subfield is ignored. 2. aack_upld_res_ft = 1, aack_flt_res_ft = 1: if aack_flt_res_ft = 1 any frame with a reserved frame type is filtered by the address filter similar to a data frame as described in the standard. this implies the generation of the irq_5 (ami) interrupts upon address match. an irq_3 (trx_end) interrupt is only generated if the address matched and the frame was not corrupted. an acknowledgment is only send, when the ac k request subfield wa s set in the received frame and an irq_3 (trx_end) interrupt occurred. 3. aack_upld_res_ft = 0: any received frame indicated as a reserved frame is discarded. table 7-10. rx_aack configuration to receive reserved frame types (continued)
60 8111c?mcu wireless?09/09 at86rf231 note that this feature can be used in all scenarios, independent of other configurations. how- ever, shorter acknowledgment timi ng is especially useful when using high data rate modes to increase battery lifetime and to improve the overall data throughput; refer to section 11.3 ?high data rate modes? on page 137 . 7.2.3.4 rx_aack_noclk - rx_aack_on without clkm if the at86rf231 is listening for an incoming frame and the microcontroller is not running an application, the microcontroller can be power ed down to decrease the total system power con- sumption. this special power-down scenario for systems running in clock synchronous mode (see section 6. ?microcontroller interface? on page 16 ) is supported by the at86rf231 using the state rx_aack_on_noclk. the radio transceiver f unctionality in this state is based on that in state rx_aack_on with pin 17 (clkm) disabled. the rx_aack_noclk state is entered from rx_aack_on by a rising edge at pin 11 (slp_tr). the return to rx_aack_on state results either from a successful frame reception or a falling edge on pin slp_tr. the clkm pin is disabled 35 clock cycles after the rising edge at slp_tr pin. this allows the microcontroller to complete its power-down sequence. this is not valid for clock rates 250 khz and 62.5 khz, where the main clock at pi n 17 (clkm) is switched off immediately. in case of the reception of a valid frame, irq_3 (trx_end) is issued and pin 17 (clkm) is turned on. a timing diagram is shown in figure 6-16 on page 28 . a received frame is considered valid if it passes address filtering and has a correct fcs. if an ack was requested the radio transceiver enters busy_rx_aack state and follows the procedure described in section 7.2.3 ?rx_aack_on - receive with automatic ack? on page 51 . after the transaction has been completed, the radio transceiver reenters the rx_aack_on state. the radio transceiver reenters the rx_aack_on_noclk state only, when the next rising edge at slp_tr pin occurs. it is not recommended to operate the receiver in state rx_aack_noclk with register bit slotted_operation (register 0x2c, xah_xtrl_0) set, refer to ?register description - control registers? on page 68 . table 7-11. overview of rx_aack configuration bits register register register name description address bit 0x17 2 aack_ack_time 0 : standard compliant acknowledgement timing of 12 symbol periods. in slotted acknowledge- ment operation mode, the acknowledgment frame transmission can be triggered 6 symbol periods after reception of the frame earliest. 1 : reduced acknowledgment timing of 2 symbol periods (32 s).
61 8111c?mcu wireless?09/09 at86rf231 7.2.3.5 frame filtering frame filtering is an evaluation whether or not a received frame is dedicated for this node. to accept a received frame and to generate an address match interrupt irq_5 (ami) a filtering pro- cedure as described in ieee 802.15.4-2006, section 7.5.6.2 (third level of filtering) is applied to the frame. the at86rf231 rx_aack mode accepts only frames that satisfy all of the following requirements (quote from ieee 802.15.4-2006, section 7.5.6.2): address match, indicated by interrupt irq_5 (ami), is further controlled by the content of sub- fields of the frame control field of a received frame according to the following rule: if (destination addressing mode = 0 or 1) and (source addressing mode = 0) no irq_5 (ami) is generated, refer to section 8.1.2.2 ?frame control field (fcf)? on page 80 . this effectively causes all acknowledgement frames not to be a nnounced, which otherwise always pass the fil- ter, regardless of whether they are intended for this device or not. for backward compatibility to ieee 802.15.4-2003 third leve l filter rule 2 (fra me version) can be disabled by register bits aack_fvn_mode (register 0x2e, csma_seed_1). frame filtering is available in extended and basic operating mode, refer to section 7.1 ?basic operating mode? on page 33 , a frame passing the frame filtering generates an irq_5 (ami), if enabled. notes ? filter rule 1 is affected by register bi ts aack_fltr_res_ft and aack_upld_res_ft, section 7.2.7 ?register description - control registers? on page 68 . ? filter rule 2 is affected by register bits aack_fvn_mode, section 7.2.7 ?register description - control registers? on page 68 . 1. the frame type subfield shall not contain a reserved frame type. 2. the frame version subfield shall not contain a reserved value. 3. if a destination pan identifier is included in the frame, it shall match macpanid or shall be the broadcast pan identifier (0xffff). 4. if a short destination address is included in the frame, it shall match either macshortaddress or the broadcast address (0xffff). otherwise, if an extended destination address is included in the frame, it shall match aextendedaddress. 5. if the frame type indicates that the frame is a beacon frame, the source pan identifier shall match macpanid unless macpanid is equal to 0xfff, in which case the beacon frame shall be accepted regardless of the source pan identifier. 6. if only source addressing fields are included in a data or mac command frame, the frame shall be accepted only if the device is the pan coordinator and the source pan identifier matches macpanid. the at86rf231 requires satisfying two additional rules: 7. the frame type indicates that the frame is not an ack frame (refer to table 8-4 on page 82). 8. at least one address field must be configured.
62 8111c?mcu wireless?09/09 at86rf231 7.2.3.6 rx_aack slotted operation - slotted acknowledgement at86rf231 supports slotted acknowledgement operation, refer to ieee 802.15.4-2006, section 7.5.6.4.2, in conjunction with the microcontroller. in rx_aack mode with register bit slotted_ operation (register 0x2c, xah_ctrl_0) set, the transmission of an acknowledgement frame has to be controlled by the microcontroller. if an ack frame has to be transmitted, the radio transceiver expects a rising edge on pin 11 (slp_tr) to actually start the transmission. this waiting state is signaled 6 symbol periods after the reception of the last symbol of a data or mac command frame by register bits trac_status (register 0x02, xah_ctrl_0), which are set to success_wait_for_ack in that case. in networks using slotted operation the start of the acknowledgment frame, and thus the exact timing, must be provided by the microcontroller. a timing example of an rx_aack transaction with register bit slotted_operation (register 0x2c, xah_ctrl_0) set is shown in figure 7-10 on page 62 . the acknowledgement frame is ready to transmit 6 symbol times after the recept ion of the last symbol of a data or mac com- mand frame. the transmission of the acknowledgement frame is initiated by the microcontroller with the rising edge of pin 11 (slp_tr) and starts t tr10 = 16 s later. the interrupt latency t irq is specified in section 12.4 ?digital interface timing characteristics? on page 157 , parameter 12.4.17. figure 7-10. example timing of an rx_aack transaction for slotted operation if register bit aack_ack_time (register 0x17 , xah_ctrl_1) is set, an acknowledgment frame can be sent already 2 symbol times after the rec eption of the last symbol of a data or mac com- mand frame. 7.2.3.7 rx_aack mode timing a timing example of an rx_aack transaction is shown in figure 7-11 on page 63 . in this exam- ple a data frame of length 10 with an ack request is received. the at86rf231 changes to state busy_rx_aack after sfd detection. the completion of the frame reception is indicated by a trx_end interrupt. interrupts irq_2 (rx_start) and irq_5 (ami) are disabled in this exam- ple. the ack frame is automatically transmit ted after a default wait period of 12 symbols (192 s), register bit aack_ack_time = 0 (reset value). the interrupt latency t irq is specified in section 12.4 ?digital interface timing characteristics? on page 157 , parameter 12.4.17. rx/tx frame on air rx_aack_on trx_state frame type rx_aack_on rx/tx rx tx trx_end irq rx typ. processing delay t irq 512 0 704 time [s] 64 1026 data frame (length = 10, ack=1) ack frame sfd 96 s (6 symbols) slp_tr t tr10 tx rx slp_tr ack transmission initated by microcontroller busy_rx_aack rx waiting period signalled by register bits trac_status
63 8111c?mcu wireless?09/09 at86rf231 figure 7-11. example timing of an rx_aack transaction if register bit aack_ack_time (register 0x17 , xah_ctrl_1) is set, an acknowledgment frame is sent already 2 symbol times after the reception of the last symbol of a data or mac command frame. rx/tx frame on air rx_aack_on busy_rx_aack trx_state frame type rx_aack_on rx/tx rx tx trx_end irq rx typ. processing delay t irq 512 0 704 time [s] 64 1088 data frame (length = 10, ack=1) ack frame sfd 192 s (12 symbols)
64 8111c?mcu wireless?09/09 at86rf231 7.2.4 tx_aret_on - transmit with automatic retry and csma-ca retry figure 7-12. flow diagram of tx_aret trx_state = tx_aret_on csma_rctr = 0 trx_state = tx_aret_on n y failure success n y frame_rctr = 0 transmit frame frame_rctr = frame_rctr + 1 y n n y trac_status = no_ack trac_status = success trac_status = channel_access_failure issue irq_3 (trx_end) interrupt cca result ack requested ack valid trac_status = success_data_pending y n receive ack until timeout y n trx_state = busy_tx_aret trac_status = invalid max_csma_retries <7 y n csma_rctr > max_csma_retries y note 1: if max_csma_retries = 7 no retry is performed (see note 1) random back-off csma_rctr = csma_rctr + 1 cca start tx frame_rctr > max_frame_retries data pending n
65 8111c?mcu wireless?09/09 at86rf231 overview the implemented tx_aret algorithm is shown in figure 7-12 on page 64 . in tx_aret mode, the at86rf231 first executes the csma-ca algorithm, as defined by ieee 802.15.4-2006, section 7.5.1.4, initiated by a transmit start event. if the channel is idle a frame is transmitted from the frame buffer. if the acknowledgement frame is requested the radio transceiver additionally checks for an ack reply. the completion of the tx_aret transmit trans action is indicated by an irq_3 (trx_end) interrupt. description configuration and address bits are to be set in trx_off or pll_on state prior to switching to tx_aret mode. it is further recommended to transfer the psdu data to the frame buffer in advance. the transaction is started by ei ther using pin 11 (slp_tr), refer to section 6.5 ?sleep/wake-up and transmit signal (slp_tr)? on page 27 , or writing a tx_start command to register 0x02 (trx_state). if the csma-ca detects a busy channel, it is retried as specified by the register bits max_csma_retries (register 0x2c, xah_ctrl_0). in case that csma-ca does not detect a clear channel after max_csma_retries, it aborts the tx_aret transaction, issues inter- rupt irq_3 (trx_end), and set the value of the trac_status register bits to channel_access_failure. during transmission of a frame the radio transceiver parses bit 5 (ack request) of the mac header (mhr) frame control field of the psdu data (psdu octet #1) to be transmitted to check if an ack reply is expected. if an ack is expected, the radio transceiver automat ically switches into receive mode to wait for a valid ack reply. after receiving an ack fram e the frame pending subfield of that frame is parsed and the status register bits trac _status are updated accordingly, refer to table 7-12 on page 66 . this receive procedure does not overwrite the frame buffer content. transmit data in the frame buffer is not changed during the entire tx_aret transaction. received frames other than the expected ack frame are discarded. if no valid ack is received or after timeout of 54 symbol periods (864 s), the radio transceiver retries the entire transaction, (i ncluding csma-ca) until the maximum number of retransmis- sions (as set by the register bits max_fram e_retries in register 0x2c (xah_ctrl_0) is exceeded. after that, the microcontroller may read the val ue of the register bits trac_status (register 0x02, trx_state) to verify whether the transaction was successful or not. the register bits are set according to the following cases, additional exit codes are described in section 7.2.6 ?regis- ter summary? on page 68 :
66 8111c?mcu wireless?09/09 at86rf231 note that if no ack is expected (according to the content of the received frame in the frame buffer), the radio transceiver issues irq_3 (trx_end) directly after the frame transmission has been completed. the value of register bits trac_status (register 0x02, trx_state) is set to success. a value of max_csma_retries = 7 initiates an immediate tx_aret transaction without per- forming csma-ca. this is required to support slotted acknowledgement operation. further the value max_frame_retries is ignored and the tx_aret transaction is performed only once. a timing example of a tx_aret transaction is shown in figure 7-13 on page 66 . figure 7-13. example timing of a tx_aret transaction note: t csma-ca defines the random csma-ca processing time here an example data frame of length 10 with an ack request is transmitted, see table 7-13 on page 67 . after that the at86rf231 switches to receive mode and expects an acknowledgement response. during the whole transaction including frame transmit, wait for ack and ack receive the radio transceiver status register trx_status (register 0x01, trx_status) signals busy_tx_aret. a successful reception of the acknowledgment frame is indicated by irq_3 (trx_end). the status register trx_status (register 0x01, trx_status) changes back to tx_aret_on. the tx_aret status register trac_status changes as well to trac_status = success table 7-12. interpretation of trac_status register bits value name description 0 success the transaction was responded by a valid ack, or, if no ack is requested, after a successful frame transmission 1 success_data_pending equivalent to su ccess, indicates pending frame data according to the mhr frame control field of the received ack response 3 channel_access_failure channel is still busy after max_csma_retries of csma-ca 5 no_ack no acknowledgement frames were received during all retry attempts 7 invalid entering tx_aret mode sets trac_status = 7 rx/tx frame on air tx_aret_on busy_tx_aret trx_state frametype tx_aret_on rx/tx rx trx_end irq typ. processing delay 16 s 672 0x time [s] 128 x+352 slp_tr tx t irq data frame (length = 10, ack=1) ack frame 32 s t csma-ca tx csma-ca rx
67 8111c?mcu wireless?09/09 at86rf231 or trac_status = success_data_pending if t he frame pending subfie ld of the received ack frame was set to 1. 7.2.5 interrupt handling the interrupt handling in the extended operating mode is similar to the basic operating mode, refer to section 7.1.3 ?interrupt handling? on page 38 . the microcontroller enables interrupts by setting the appropriate bit in register 0x0e (irq_mask). for rx_aack and tx_aret the following interrupts inform about the status of a frame recep- tion and transmission: rx_aack for rx_aack it is recommended to enable irq_3 (trx_end). this interrupt is issued only if a frame passes the frame filtering, refer to section 7.2.3.5 ?frame filtering? on page 61 and has a valid fcs. this is in contrast to basic operating mode, refer to section 7.1.3 ?interrupt handling? on page 38 . the use of the other interrupts is optional. on reception of a valid phr an irq_2 (rx_start) is issued. irq_5 (ami) indicates address match, refer to filter rules in section 7.2.3.5 ?frame filtering? on page 61 , and the completion of a frame reception with a valid fcs is indicated by interrupt irq_3 (trx_end). thus, it can happen that an irq_2 (rx_start) and/or irq_5 (ami) are issued, but no irq_3 (trx_end) interrupt. tx_aret in tx_aret interrupt irq_3 (trx_end) is onl y issued after completing the entire tx_aret transaction. acknowledgement frames do not issue irq_5 (ami) or irq_3 (trx_end) interrupts. all other interrupts as described in section 6.6 ?interrupt logic? on page 29 , are also available in extended operating mode. table 7-13. interrupt handling in extended operating mode mode interrupt description rx_aack irq_2 (rx_start) indicates a phr reception irq_5 (ami) issued at address match irq_3 (trx_end) signals completion of rx_aack transaction if successful - a received frame must pass the address filter - the fcs is valid tx_aret irq_3 (trx_end) signals completion of tx_aret transaction both irq_0 (pll_lock) entering rx_aack_on or tx_aret_on state from trx_off state, the pll_lock interrupt signals that the transaction can be started
68 8111c?mcu wireless?09/09 at86rf231 7.2.6 register summary the following registers are to be configured to control the extended operating mode: 7.2.7 register description - control registers register 0x01 (trx_status): the read-only register trx_status signals the present state of the radio transceiver as well as the status of a cca application. a state change is initiated by writing a state transition com- mand to register bits trx_cmd (register 0x02, trx_state). ? bit 7 - cca_done refer to section 8.5 ?clear channel assessment (cca)? on page 94 , not updated in extended operating mode. ? bit 6 - cca_status refer to section 8.5 ?clear channel assessment (cca)? on page 94 , not updated in extended operating mode. ? bit 5 - reserved ? bit [4:0] - trx_status the register bits trx_status signal the current radio transceiver status. table 7-14. register summary reg.-addr register name description 0x01 trx_status radio transceiver status, cca result 0x02 trx_state radio transceiver state control, tx_aret status 0x04 trx_ctrl_1 tx_auto_crc_on 0x08 phy_cc_cca cca mode control, see section 8.5.6 0x09 cca_thres cca threshold settings, see section 8.5.6 0x17 xah_ctrl_1 rx_aack control 0x20 - 0x2b address filter configuration - short address, pan- id and ieee address 0x2c xah_ctrl_0 tx_aret control, retries value control 0x2d csma_seed_0 csma-ca seed value 0x2e csma_seed_1 csma-ca seed value, rx_aack control 0x2f csma_be csma-ca back-off exponent control bit 7 6 5 4 3 2 1 0 +0x01 cca_done cca_status reserved trx_status trx_status read/write r r r r r r r r reset value 0 0 0 0 0 0 0 0
69 8111c?mcu wireless?09/09 at86rf231 notes: 1. in sleep state register not accessible. 2. do not try to initiate a further state change while the radio transceiver is in state_transition_in_progress state. register 0x02 (trx_state): the at86rf231 radio transceiver states are cont rolled via register trx_state using register bits trx_cmd. the read-only register bits trac_status indicate the status or result of an extended operating mode transaction. a successful state transition shall be confirmed by reading register bits trx_status (register 0x01, trx_status). register bits trx_cmd are used for extended and basic operating mode, refer to section 7.1 ?basic operating mode? on page 33 . ? bit [7:5] - trac_status the status of the rx_aack and tx_aret pr ocedure is indicated by register bits trac_status. details of the algorithm and a desc ription of the status information are given in table 7-15. radio transceiver status register bit value state description trx_status 0x00 p_on 0x01 busy_rx 0x02 busy_tx 0x06 rx_on 0x08 trx_off (clk mode) 0x09 pll_on (tx_on) 0x0f (1) sleep 0x11 busy_rx_aack 0x12 busy_tx_aret 0x16 rx_aack_on 0x19 tx_aret_on 0x1c rx_on_noclk 0x1d rx_aack_on_noclk 0x1e busy_rx_aack_noclk 0x1f (2) state_transition_in_progress all other values are reserved b i t 76 5 43210 +0x02 trac_status trx_cmd trx_state read/write r r r r/w r/w r/w r/w r/w reset value 0 0 0 0 0 0 0 0
70 8111c?mcu wireless?09/09 at86rf231 section 7.2.3 ?rx_aack_on - receiv e with automatic ack? on page 51 and section 7.2.4 ?tx_aret_on - transmit with automatic retry and csma-ca retry? on page 64 . notes: 1. even though the reset value for register bits trac_status is 0, the rx_aack and tx_aret procedures set the regi ster bits to trac_status = 7 (invalid) when it is started. tx_aret rx_aack ? bit [4:0] - trx_cmd a write access to register bits trx_cmd initiate a radio transceiver state transition: table 7-16. trac_status transaction status register bits value description rx_aack tx_aret trac_status 0 (1) success x x 1 success_data_pending x 2 success_wait_for_ack x 3 channel_access_failure x 5no_ack x 7 (1) invalid x x all other values are reserved success_data_pending: indicates a successful reception of an ack frame with frame pending bit set to 1. success_wait_for_ack: indicates an ack frame is about to sent in rx_aack slotted acknowledgement. slotted acknowledgement operation must be enabled with register bit slotted_operation (register 0x2c, xah_xtrl_0). the microcontroller must pulse pin 11 (slp_tr) at the next back-off slot boundary in order to initiate a transmission of the ack frame. for details refer to ieee 802.15.4-2006, section 7.5.6.4.2. table 7-17. state control register register bit value state description trx_cmd 0x00 nop 0x02 tx_start 0x03 force_trx_off 0x04 (1)(2) force_pll_on 0x06 rx_on 0x08 trx_off (clk mode) 0x09 pll_on (tx_on) 0x16 rx_aack_on 0x19 tx_aret_on all other values are reserved and mapped to nop
71 8111c?mcu wireless?09/09 at86rf231 notes: 1. force_pll_on is not valid for states sleep, p_on, reset, trx_off, and all *_noclk states, as well as state_transition_in_progress towards these states. 2. using force_pll_on to interrupt an tx_are t transaction, it is recommended to check register bits [7:5] of register address 0x32 fo r value 0. if this value is different, trx_cmd sequence force_trx_off shall be used imm ediately followed by trx_cmd sequence pll_on. this performs a state transition to pll_on. register 0x04 (trx_ctrl_1): the trx_ctrl_1 register is a multi purpose regi ster to control various operating modes and settings of the radio transceiver. ? bit 7 - pa_ext_en refer to section 11.5 ?rx/tx indicator? on page 147 . ? bit 6 - irq_2_ext_en refer to section 11.6 ?rx frame time stamping? on page 150 . ? bit 5 - tx_auto_crc_on if set, register bit tx_auto_ crc_on enables the automatic fcs generation. for further details refer to section 8.2 ?frame check sequence (fcs)? on page 85 . ? bit 4 - rx_bl_ctrl refer to section 11.7 ?frame buffer empty indicator? on page 152 . ? bit [3:2] - spi_cmd_mode refer to section 6.3 ?radio transceiver status information? on page 24 . ? bit 1 - irq_mask_mode refer to section 6.6 ?interrupt logic? on page 29 . ? bit 0 - irq_polarity refer to section 6.6 ?interrupt logic? on page 29 . register 0x17 (xah_ctrl_1): the xah_ctrl_1 register is a control register for extended operating mode. ? bit [7:6] - reserved bit 7 6 5 4 3 2 1 0 +0x04 pa_ext_en irq_2_ext_en tx_auto_crc_on rx_bl_ctrl spi_cmd_mode irq_mask_mode irq_polarity trx_ctrl_1 read/write r/w r/w r/w r/w r/w r/w r/w r/w reset value 0 0 1 0 0 0 0 0 bit 7 6 5 4 3 2 1 0 +0x17 reserved aack_fltr_res_ft aack_upld_res_ft reserved aack_ack_time aack_prom_mode reserved xah_ctrl_1 read/write r/w r r/w r/w r r/w r/w r reset value 0 0 0 0 0 0 0 0
72 8111c?mcu wireless?09/09 at86rf231 ? bit 5 - aack_fltr_res_ft this register bit shall only be set if aack_upld_res_ft = 1. if aack_fltr_res_ft = 1 reserved frame types are filtered similar to data frames as speci- fied in ieee 802.15.4-2006. reserved frame types are explained in ieee 802.15.4, section 7.2.1.1.1. if aack_fltr_res_ft = 0 the received reserved frame is only checked for a valid fcs. ? bit 4 - aack_upld_res_ft if aack_upld_res_ft = 1 received frames indi cated as a reserved frame are further pro- cessed. for those frames, an irq_3 (trx_end) interrupt is generated if the fcs is valid. in conjunction with the configuration bit aack_fltr_res_ft set, these frames are handled like ieee 802.15.4 compliant data frames during rx_aack transaction. an irq_5 (ami) inter- rupt is issued, if the addresses in the received frame match the node's addresses. that means, if a reserved frame passes the third level filter rules, an acknowledgement frame is generated and transmitted if it was requested by the received frame. if this is not wanted register bit aack_dis_ack (register 0x2e , csma_seed_1) has to be set. ? bit 3 - reserved ? bit 2 - aack_ack_time according to ieee 802.15.4, section 7.5.6.4.2, the transmission of an acknowledgment frame shall commence 12 symbols (aturnaroundtime) after the reception of the last symbol of a data or mac command frame. this is achieved with the reset value of the register bit aack_ack_time. alternatively, if aack_ack_time = 1 an acknowledgment frame is sent already 2 symbol peri- ods after the reception of the last symbol of a data or mac command frame. this may be applied to proprietary networks or networks using the high data rate modes to increase battery lifetime and to improve the overall data throughput; refer to section 11.3 ?high data rate modes? on page 137 . this setting affects also to acknowledgment frame response time for slotted acknowledgement operation, see section 7.2.3.6 ?rx_aack slotted o peration - slotted acknowledgement? on page 62 . ? bit 1 - aack_prom_mode register bit aack_prom_mode enables the promiscuous mode, within the rx_aack mode; refer to ieee 802.15.4-2006, section 7.5.6.5. if this bit is set, every incoming frame with a valid phr finishes with ir q_3 (trx_end) interrupt even if the third level filter rules do not match or the fcs is not valid. register bit rx_crc_valid (register 0x06, phy_rssi) is set accordingly. here, if a frame passes the third level filter rules, an acknowledgement frame is generated and transmitted unless disabled by register bit aack_dis_ack (register 0x2e, csma_seed_1). ? bit 0 - reserved
73 8111c?mcu wireless?09/09 at86rf231 register 0x2c (xah_ctrl_0): register 0x2c (xah_ctrl_0) is a control register for extended operating mode. ? bit [7:4] - max_frame_retries the setting of max_frame_retries in tx_aret mode specifies the number of attempts to retransmit a frame, when it was not acknowledged by the recipient, before the transaction gets cancelled. ? bit [3:1] - max_csma_retries max_csma_retries specifies the number of re tries in tx_aret mode to repeat the csma- ca procedure before the transaction gets cancelled. according ieee 802.15.4 the valid range of max_csma_retries is [0, 1, ?, 5]. a value of max_csma_retries = 7 initiates an immediate frame transmission without per- forming csma-ca. this may especially be required for slotted acknowledgement operation. max_csma_retries = 6 is reserved. ? bit 0 - slotted_operation using rx_aack mode in networks operating in beacon or slotted mode, refer to ieee 802.15.4 2006, section 5.5.1, register bit slotte d_operation indicates that acknowledgement frames are to be sent on back-off slot boundaries (slotted acknowledgement). if this register bit is set the acknowledgement frame transmission has to be initiated by the microcontroller using the rising edge of pin 11 (slp_tr). this waiting state is signaled in sub register trac_status (register 0x02, trx_ state) with value success_wait_for_ack. register 0x2d (csma_seed_0): b i t 7654321 0 +0x2c max_frame_retries max_csma_retr ies slotted_operation xah_ctrl_0 read/write r/w r/w r/w r/w r/w r/w r/w r/w reset value 0 0 1 1 1 0 0 0 table 7-18. register bit slotted acknowledgement operation register bit value state description slotted_operation 0 the radio transceiver operates in unslotted mode. an acknowledgment frame is autom atically sent if requested. 1 refer to section 7.2.3.6 . the transmission of an acknowledgement frame has to be controlled by the microcontroller. b i t 76543210 +0x2d csma_seed_0[7:0] csma_seed_0 read/write r/w r/w r/w r/w r/w r/w r/w r/w r e s e t v a l u e11101010
74 8111c?mcu wireless?09/09 at86rf231 ? bit [7:0] - csma_seed_0 this register contains the lower 8-bit of the csma_seed, bits [7:0]. the higher 3 bit are part of register bits csma_seed_1 (register 0x2e, cs ma_seed_1). csma_seed is the seed for the random number generation that determines the l ength of the back-off period in the csma-ca algorithm. it is recommended to initialize registers csma_seed by random values. this can be done using register bits rnd_value (register 0x06, phy_rssi), refer to section 11.2 ?random number generator? on page 136 . register 0x2e (csma_seed_1): the csma_seed_1 register is a control register for rx_aack and contains a part of the csma_seed for the csma-ca algorithm. note: the register bits csma_seed_0/1 content initializes the tx_aret random backoff generator after leaving sleep state. to prevent a reinitializat ion with the same value it is recommended to reinitialize all regi ster bits with random values before entering sleep state. ? bit [7:6] - aack_fvn_mode the frame control field of the mac header (mhr) contains a frame version subfield. the setting of aack_fvn_mode specifies the frame filtering behavior of the at86rf231. according to the content of these register bits the radio transceiver passes frames with a specific frame version number, number group, or independent of the frame version number. thus the register bit aack_fvn_mode defi nes the maximum acceptable frame version. received frames with a higher frame version number than configured do not pass the address filter and are not acknowledged. the frame version field of the acknowledgment frame is set to 0x00 according to ieee 802.15.4- 2006, section 7.2.2.3.1, acknowledgment frame mhr fields. ? bit 5 - aack_set_pd the content of aack_set_pd bit is copied into the frame pending subfield of the acknowledg- ment frame if the ack is the answer to a data request mac command frame. in addition, if register bi ts aack_fvn_mode (register 0x 2e, csma_seed_1) are configured to accept frames with a frame version other than 0 or 1, the content of register bit bit 76 5 4 3 2 1 0 +0x2e aack_fvn_mode aack_set_pd aack_dis_ack aack_i_am_coord csma_seed_1 csma_seed_1 read/write r/w r/w r/w r/w r/w r/w r/w r/w reset value 01 0 0 0 0 1 0 table 7-19. register bit slotted acknowledgement operation register bit value state description aack_fvn_mode 0 acknowledge frames with version number 0 1 acknowledge frames with version number 0 or 1 2 acknowledge frames with version number 0 or 1 or 2 3 acknowledge independent of frame version number
75 8111c?mcu wireless?09/09 at86rf231 aack_set_pd is also copied into the frame pending subfield of the acknowledgment frame for any mac command frame with a frame version of 2 or 3 that have the security enabled subfield set to 1. this is done in the assumption that a future version of the standard [1] might change the length or structure of the auxiliary security header, so it is not possible to safely detect whether the mac command frame is actually a data request command or not. ? bit 4 - aack_ dis_ack if this bit is set no acknowledgment frames are transmitted in rx_aack extended operating mode, even if requested. ? bit 3 - aack_i_am_coord this register bit has to be set if the node is a pan coordinator. it is used for address filtering in rx_aack. if aack_i_am_coord = 1 and if only source addres sing fields are included in a data or mac command frame, the frame shall be accepted only if the device is the pan coordinator and the source pan identifier matches macpanid, for details refer to ieee 802.15.4, section 7.5.6.2 (third-level filter rule 6). ? bit [2:0] - csma_seed_1 these register bits are the higher 3-bit of the csma_seed, bits [10:8]. the lower part is in reg- ister 0x2d (csma_seed _0), see register csma_seed_0 for details. register 0x2f (csma_be): ? bit [7:4] - max_be register bits max_be defines the maximum back-off exponent used in the csma-ca algorithm to generate a pseudo random number for back off the cca. for details refer to ieee 802.15.4- 2006, section 7.5.1.4. valid values are [4'd8, 4'd7, ? , 4'd3]. ? bit [3:0] - min_be register bits min_be defines the minimum back-off exponent used in the csma-ca algorithm to generate a pseudo random number for back off the cca. for details refer to ieee 802.15.4- 2006, section 7.5.1.4. valid values are [max_be, (max_be - 1), ? , 4'd0]. note ? if min_be = 0 and max_be = 0 the cca back off period is always set to 0. bit 76543210 +0x2f max_be min_be csma_be read/write r/w r/w r/w r/w r/w r/w r/w r/w reset value 01010011
76 8111c?mcu wireless?09/09 at86rf231 7.2.8 register description - address registers register 0x20 (short_addr_0): this register contains the lower 8 bit of the mac short address for frame filter address recogni- tion, bits [7:0]. register 0x21 (short_addr_1): this register contains the upper 8 bit of the mac short address for frame filter address recogni- tion, bits [15:8]. register 0x22 (pan_id_0): this register contains the lower 8 bit of the mac pan id for frame filter address recognition, bits [7:0]. register 0x23 (pan_id_1): this register contains the upper 8 bit of the mac pan id for frame filter address recognition, bits [15:8]. b i t 76543210 +0x20 short_addr_0[7:0] short_addr_0 read/write r/w r/w r/w r/w r/w r/w r/w r/w r e s e t v a l u e11111111 b i t 76543210 +0x21 short_addr_1[7:0] short_addr_1 read/write r/w r/w r/w r/w r/w r/w r/w r/w r e s e t v a l u e11111111 b i t 76543210 +0x22 pan_id_0[7:0] pan_id_0 read/write r/w r/w r/w r/w r/w r/w r/w r/w r e s e t v a l u e11111111 b i t 76543210 +0x23 pan_id_1[7:0] pan_id_1 read/write r/w r/w r/w r/w r/w r/w r/w r/w r e s e t v a l u e11111111
77 8111c?mcu wireless?09/09 at86rf231 register 0x24 (ieee_addr_0): this register contains the lower 8 bit of the mac ieee address for frame filter address recogni- tion, bits [7:0]. register 0x25 (ieee_addr_1): this register contains 8 bit of the mac ieee address for frame filter address recognition, bits [15:8]. register 0x26 (ieee_addr_2): this register contains 8 bit of the mac ieee address for frame filter address recognition, bits [23:16]. register 0x27 (ieee_addr_3): this register contains 8 bit of the mac ieee address for frame filter address recognition, bits [31:24]. b i t 76543210 +0x24 ieee_addr_0[7:0] ieee_addr_0 read/write r/w r/w r/w r/w r/w r/w r/w r/w r e s e t v a l u e00000000 b i t 76543210 +0x25 ieee_addr_1[7:0] ieee_addr_1 read/write r/w r/w r/w r/w r/w r/w r/w r/w r e s e t v a l u e00000000 b i t 76543210 +0x26 ieee_addr_2[7:0] ieee_addr_2 read/write r/w r/w r/w r/w r/w r/w r/w r/w r e s e t v a l u e00000000 b i t 76543210 +0x27 ieee_addr_3[7:0] ieee_addr_3 read/write r/w r/w r/w r/w r/w r/w r/w r/w r e s e t v a l u e00000000
78 8111c?mcu wireless?09/09 at86rf231 register 0x28 (ieee_addr_4): this register contains 8 bit of the mac ieee address for frame filter address recognition, bits [39:32]. register 0x29 (ieee_addr_5): this register contains 8 bit of the mac ieee address for frame filter address recognition, bits [47:40]. register 0x2a (ieee_addr_6) : this register contains 8 bit of the mac ieee address for frame filter address recognition, bits [55:48]. register 0x2b (ieee_addr_7): this register contains the most significant 8 bits of the ma c ieee frame filter address for address recognition, bits [63:56]. b i t 76543210 +0x28 ieee_addr_4[7:0] ieee_addr_4 read/write r/w r/w r/w r/w r/w r/w r/w r/w r e s e t v a l u e00000000 b i t 76543210 +0x29 ieee_addr_5[7:0] ieee_addr_5 read/write r/w r/w r/w r/w r/w r/w r/w r/w r e s e t v a l u e00000000 b i t 76543210 +0x2a ieee_addr_6[7:0] ieee_addr_6 read/write r/w r/w r/w r/w r/w r/w r/w r/w r e s e t v a l u e00000000 b i t 76543210 +0x2b ieee_addr_7[7:0] ieee_addr_7 read/write r/w r/w r/w r/w r/w r/w r/w r/w r e s e t v a l u e00000000
79 8111c?mcu wireless?09/09 at86rf231 8. functional description 8.1 introduction - ieee 802.15.4 - 2006 frame format figure 8-1 on page 79 provides an overview of the physical layer (phy) frame structure as defined by ieee 802.15.4. figure 8-2 on page 80 shows the frame structure of the medium access control (mac) layer. figure 8-1. ieee 802.15.4 frame format - phy-layer frame structure (ppdu) 8.1.1 phy protocol layer data unit (ppdu) 8.1.1.1 8.1.1.1 synchronization header (shr) the shr consists of a four-octet preamble field (all zero), followed by a single byte start-of- frame delimiter (sfd) which has the predefined value 0xa7. during transmit, the shr is auto- matically generated by the at86rf231, thus the frame buffer shall contain phr and psdu only. the transmission of the shr requires 160 s (10 symbols). as the spi data rate is normally higher than the over-air data rate, this allows the microcontroller to initiate a transmission without having transferred the full frame data already. instead it is possible to subsequently write the frame content. during frame reception, the shr is used for synchronization purposes. the matching sfd determines the beginning of the phr and the following psdu payload data. 8.1.1.2 phy header (phr) the phy header is a single octet following the shr. the least significant 7 bits denote the frame length of the following psdu, while the most significant bit of that octet is reserved, and shall be set to 0 for ieee 802.15.4 compliant frames. on receive the phr is returned as the first octet during frame buffer read access. even though the standard only defines frame lengths 127 bytes, at86rf231 is able to transmit and receive frame length values >127. for ieee 802.15.4 co mpliant operation bit 7 has to be masked by sw. the reception of a valid phr is signaled by an interrupt irq_2 (rx_start). on transmit the phr is to be supplied by the microcontroller during frame buffer write access as the first octet. 8.1.1.3 phy payload (phy service data unit, psdu) the psdu has a variable length between 0 and amaxphypacketsize (127, maximum psdu size in octets) whereas the last two octets are used for the frame check sequence (fcs). the length of the psdu is signaled by the frame length field (phr), refer to table 8-1 on page 80 . the psdu contains the mac protocol layer data unit (mpdu). max. 127 octets phy service data unit (psdu) 1 octet (phr) 5 octets synchronization header (shr) phy protocol data unit (ppdu) preamble sequence sfd frame length phy payload mac protocol data unit (mpdu)
80 8111c?mcu wireless?09/09 at86rf231 received frames with a frame length field set to 0x00 (invalid phr) are not signaled to the microcontroller. table 8-1 on page 80 summarizes the type of payload versus the frame length value. 8.1.2 mac protocol layer data unit (mpdu) figure 8-2 on page 80 shows the frame structure of the mac layer. figure 8-2. ieee 802.15.4 frame format - mac-layer frame structure (mpdu) 8.1.2.1 mac header (mhr) fields the mac header consists of the frame control field (fcf), a sequence number, and the addressing fields (which are of variable length , and can even be empty in certain situations). 8.1.2.2 frame control field (fcf) the fcf consists of 16 bits, and occupies the first two octets of the mpdu or psdu, respectively. figure 8-3. ieee 802.15.4-2006 frame control field (fcf) table 8-1. frame length field - phr frame length value payload 0 - 4 reserved 5 mpdu (acknowledgement) 6 - 8 reserved 9 - amaxphypacketsize mpdu frame control field 2 octets frame pending reserved frame version ack request intra pan destination addressing mode source addressing mode sec. enabled (mfr) mac service data unit (msdu) mac protocol data unit (mpdu) mac payload fcs frame type 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 mac header (mhr) fcf addressing fields sequence number 2 octets crc-16 0/5/6/10/14 octets auxiliary security header 0/4/6/8/10/12/14/16/18/20 octets destination pan id destination address source pan id source address frame control field 2 octets frame pending reserved frame version ack request intra pan destination addressing mode source addressing mode sec. enabled frame type 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
81 8111c?mcu wireless?09/09 at86rf231 ? bit [2:0]: describes the frame type. table 8-2 on page 81 summarizes frame types defined by ieee 802.15.4, section 7.2.1.1.1. this subfield is used for address f iltering by the third level filter rules. only frame types 0 - 3 pass the third level filter rules, refer to section 7.2.3.5 ?frame filtering? on page 61 automatic address filtering by the at86rf231 is enabled when using the rx_aack mode, refer to section 7.2.3 ?rx_aack_on - receive with automatic ack? on page 51 . however, a reserved frame (frame type value > 3) can be received if register bit aack_upld_res_ft (register 0x17, xah_ctrl_1) is set, for details refer to section 7.2.3.3 ?configuration of non ieee 802.15.4 co mpliant scenarios? on page 58 . address filtering is also provided in basic operating mode, refer to section 7.1 ?basic operating mode? on page 33 . ?bit 3: indicates whether security processing applies to this frame. ?bit 4: is the "frame pending" subfield. this field can be set in an acknowledgment frame (ack) in response to a data request mac command frame. this bit indicates that the node, which trans- mitted the ack, has more data to send to the node receiving the ack. for acknowledgment frames automatically generated by the at86rf231, this bit is set accord- ing to the content of register bit aack_set _pd in register 0x2e (csma_seed_1) if the received frame was a data request mac command frame. ?bit 5: forms the "acknowledgment request" subfield. if this bit is set within a data or mac command frame that is not broadcast, the recipient shall acknowledge the reception of the frame within the time specified by ieee 802.15.4 (i.e. within 192 s for non beacon-enabled networks). the radio transceiver parses this bit during rx_aack mode and transmits an acknowledgment frame if necessary. in tx_aret mode this bit indicates if an acknowledgement frame is expected after transmitting a frame. if this is the case, the receiver waits for the acknowledgment frame, otherwise the tx_aret transaction is finished. table 8-2. frame control field - frame type subfield frame control field bit assignments description frame type value b 2 b 1 b 0 value 000 0 beacon 001 1 data 010 2 acknowledge 011 3 mac command 100 - 111 4 - 7 reserved
82 8111c?mcu wireless?09/09 at86rf231 ?bit 6: the "intra-pan" subfield indicates that in a frame, where both, the destination and source addresses are present, the pan-id of the source address field is omitted. in rx_aack mode, this bit is evaluated by the address filter logic of the at86rf231. ?bit [11:10]: the "destination addressing mode" subfield descr ibes the format of the destination address of the frame. the values of the address modes are summarized in table 8-3 on page 82 , according to ieee 802.15.4. if the destination address mode is either 2 or 3 (i.e. if the destination address is present), it always consists of a 16-bit pan id first, fo llowed by either the 16-bit or 64-bit address as described by the mode. ?bit [13:12]: the "frame version" subfield specifies the version number corresponding to the frame. these register bits are reserved in ieee 802.15.4-2003. this subfield shall be set to 0 to indicate a frame compatible with ieee 802.15.4-2003 and 1 to indicate an ieee 802.15.4-2006 frame. all other subfield values shall be reserved for future use. rx_aack register bit aack_fvn_mode (regist er 0x2e, csma_seed_1) controls the behav- ior of frame acknowledgements. this register determines if, depending on the frame version number, a frame is acknowledged or not. this is necessary for backward compatibility to ieee 802.15.4-2003 and for future use. even if frame version numbers 2 and 3 are reserved, it can be handled by the radio transceiver, for details refer to section 7.2.7 ?register description - control registers? on page 68 . see ieee 802.15.4-2006, section 7.2. 3 for details on frame compatibility. table 8-3. frame control field - destination and source addressing mode frame control field bit assignments description addressing mode b 11 b 10 b 15 b 14 value 00 0 pan identifier and address fields are not present 01 1 reserved 10 2 address field contains a 16-bit short address 11 3 address field contains a 64-bit extended address table 8-4. frame control field - frame version subfield frame control field bit assignments description frame version b 13 b 12 value 00 0 frames are compatible with ieee 802.15.4 2003 01 1 frames are compatible with ieee 802.15.4-2006 10 2 reserved 11 3 reserved
83 8111c?mcu wireless?09/09 at86rf231 ?bit [15:14]: the "source addressing mode" subfield, with similar meaning as "destination addressing mode", see table 8-3 on page 82 . the subfields of the fcf (bits 0-2, 3, 6, 10-15) affect the address filter logic of the at86rf231 while operating in rx_aack operation, see section 7.2.3 ?rx_aack_o n - receive with auto- matic ack? on page 51 . 8.1.2.3 frame compatibility between i eee 802.15.4-20 03 and ieee 80 2.15.4-2006 all unsecured frames according to ieee 802.15.4-2006 are compatible with unsecured frames compliant with ieee 802.15.4-2003 with two exceptions: a coordinator realignment command frame with the "channel page" field present (see ieee 802.15.4-2006, section 7.3.8) and any frame with a mac payload field larger than amaxmacsafepayloadsize octets. compatibility for secured frames is shown in table 8-5 on page 83 , which identifies the security operating modes for ieee 802.15.4-2006. 8.1.2.4 sequence number the one-octet sequence number following the fcf identifies a particular frame, so that dupli- cated frame transmissions can be detected. while operating in rx_aack mode, the content of this field is copied from the frame to be acknowledged into the acknowledgment frame. 8.1.2.5 addressing fields the addressing fields of the mpdu are used by the at86rf231 for address matching indica- tion. the destination address (if pr esent) is always first, follow ed by the source address (if present). each address field consists of the intra pan id and a device address. if both addresses are present, and the "intra pan-id compression" subfield in the fcf is set to one, the source intra pan id is omitted. note that in addition to these general rules, ieee 802.15.4 further restricts the valid address combinations for the individual possible mac fram e types. for example, the situation where both addresses are omitted (source addressing mode = 0 and destination addressing mode = 0) is only allowed for acknowledgment frames. the address filter in the at86rf231 has been designed to apply to ieee 802.15.4 compliant frames. it can be configured to handle other frame formats and exceptions. table 8-5. frame control field - security and frame version frame control field bit assignments description security enabled b 3 frame version b 13 b 12 0 00 no security. frames are compatible between ieee 802.15.4-2003 and ieee 802.15.4-2006. 0 01 no security. frames are not compatible between ieee 802.15.4-2003 and ieee 802.15.4-2006. 1 00 secured frame formatted a ccording to ieee 802.15.4-2003. this frame type is not supported in ieee 802.15.4-2006. 1 01 secured frame formatted according to ieee 802.15.4-2006
84 8111c?mcu wireless?09/09 at86rf231 8.1.2.6 auxiliary security header field the auxiliary security header specifies information required for security processing and has a variable length. this field dete rmines how the frame is actually protected (security level) and which keying material from the mac security pib is used (see ieee 802.15.4-2006, section 7.6.1). this field shall be present only if the security enabled subfield b3, see section 8.1.2.3 ?frame compatibility between ieee 802.15.4-2003 and ieee 802.15.4-20 06? on page 83 , is set to one. for details of its structure, see ieee 802.15.4-2006, se ction 7.6.2. auxiliary security header. 8.1.2.7 mac service data unit (msdu) this is the actual mac payload. it is usually structured according to the individual frame type. a description can be found in ieee 802.15.4-2006, section 5.5.3.2. 8.1.2.8 mac footer (mfr) fields the mac footer consists of a two-octet frame checksum (fcs), for details refer to section 8.2 ?frame check sequence (fcs)? on page 85 .
85 8111c?mcu wireless?09/09 at86rf231 8.2 frame check sequence (fcs) the frame check sequence (fcs) is characterized by: ? indicate bit errors, based on a cyclic redundancy check (crc) of length 16 bit ? uses international telecommunic ation union (itu) crc polynomial ? automatically evaluated during reception ? can be automatically generated during transmission 8.2.1 overview the fcs is intended for use at the mac layer to detect corrupted frames at a first level of filter- ing. it is computed by applying an itu crc polynomial to all transferred bytes following the length field (mhr and msdu fields). the frame check sequence has a length of 16 bit and is located in the last two bytes of a frame (mac footer, see figure 8-2 on page 80 ). the at86rf231 applies an fcs check on each received frame. the fcs check result is stored in register bit rx_crc_valid in register 0x06 (phy_rssi). on transmit the radio transceiver generates and appends the fcs bytes during the frame trans- mission. this behavior can be disabled by se tting register bit tx_auto_crc_on = 0 (register 0x04, trx_ctrl_1). 8.2.2 crc calculation the crc polynomial used in ieee 802.15.4 networks is defined by: the fcs shall be calculated for transmission using the following algorithm: let be the polynomial re presenting the sequence of bits for wh ich the checksum is to be computed. multiply m(x) by x 16 , giving the polynomial divide n(x) modulo 2 by the generator polynomial, g 16 (x) , to obtain the remainder polynomial, the fcs field is given by the coefficients of the remainder polynomial, r(x). example: considering a 5 octet ack frame. the mhr field consists of 0100 0000 0000 0000 0101 0110. the leftmost bit (b 0 ) is transmitted first in time. the fcs is in this case 0010 0111 1001 1110. the leftmost bit (r 0 ) is transmitted first in time. g 16 x () x 16 x 12 x 5 1 +++ = mx () b 0 x k1 ? b 1 x k2 ? b 2 x k3 ? b k2 ? xb k1 ? +++++ = nx () mx () x 16 ? = rx () r 0 x 15 r 1 x 14 r 14 xr 15 ++++ =
86 8111c?mcu wireless?09/09 at86rf231 8.2.3 automatic fcs generation the automatic fcs generation is performed with register bit tx_auto_crc_on = 1 (reset value). this allows the at86rf231 to compute the fcs autonomously. for a frame with a frame length specified as n (3 n 127), the fcs is calculated on th e first n-2 octets in the frame buffer, and the resulting fcs field is transmitted in place of the last two octets from the frame buffer. if the radio transceivers automatic fcs generation is enabled, the frame buffer write access can be stopped right after mac payload. th ere is no need to write fcs dummy bytes. in rx_aack mode, when a received frame needs to be acknowledged, the fcs of the ack frame is always automatically generated by the at86rf231, independent of the tx_auto_crc_on setting. example: a frame transmission of length five with tx_a uto_crc_on set, is star ted with a frame buffer write access of five bytes (the last two bytes can be omitted). the first three bytes are used for fcs generation; the last two bytes are replaced by the internally calculated fcs. 8.2.4 automatic fcs check an automatic fcs check is applied on each received frame with a frame length n 2. register bit rx_crc_valid (register 0x06, phy_rssi) is se t if the fcs of a received frame is valid. the register bit is updated when issuing interrupt irq_3 (trx_end) and remains valid until the next trx_end interrupt caused by a new frame reception. in rx_aack mode, if fcs of the received frame is not valid, the radio transceiver rejects the frame and the trx_end interrupt is not issued. in tx_aret mode, the fcs and the sequence number of an ack is automatically checked. if one of these is not correct, the ack is not accepted.
87 8111c?mcu wireless?09/09 at86rf231 8.2.5 register description register 0x04 (trx_ctrl_1): the trx_ctrl_1 register is a multi purpose regi ster to control various operating modes and settings of the radio transceiver. ? bit 7 - pa_ext_en refer to section 11.5 ?rx/tx indicator? on page 147 . ? bit 6 - irq_2_ext_en refer to section 11.6 ?rx frame time stamping? on page 150 . ? bit 5 - tx_auto_crc_on register bit tx_auto_crc_on controls the automatic fcs generation for tx operations. the automatic fcs algorithm is performed autonomously by the radio transceiver if register bit tx_auto_crc_on = 1. ? bit 4 - rx_bl_ctrl refer to section 11.7 ?frame buffer empty indicator? on page 152 . ? bit [3:2] - spi_cmd_mode refer to section 6.3 ?radio transceiver status information? on page 24 . ? bit 1 - irq_mask_mode refer to section 6.6 ?interrupt logic? on page 29 . ? bit 0 - irq_polarity refer to section 6.6 ?interrupt logic? on page 29 . register 0x06 (phy_rssi): the phy_rssi register is a multi purpose register that indicates fcs validity, provides random numbers and shows the actual rssi value. bit 7 6 5 4 3 2 1 0 +0x04 pa_ext_en irq_2_ext_en tx_auto_crc_on rx_bl_ctrl spi_cmd_mode irq_mask_mode irq_polarity trx_ctrl_1 read/write r/w r/w r/w r/w r/w r/w r/w r/w reset value 0 0 1 0 0 0 0 0 b i t 7 6 5 43210 +0x06 rx_crc_valid rnd_value rssi phy_rssi r e a d / w r i t e r r r rrrrr reset value 0 0 0 0 0 0 0 0
88 8111c?mcu wireless?09/09 at86rf231 ? bit 7 - rx_crc_valid reading this register bit indicates whether the last received frame has a valid fcs or not. the register bit is updated when issuing interrupt irq_3 (trx_end) and rema ins valid until the next trx_end interrupt is issued, caused by a new frame reception. ? bit [6:5] - rnd_value refer to register description in section 11.2.2 ?register description? on page 136 . ? bit [4:0] - rssi refer to register description in section 8.3.4 ?register description? on page 90 . table 8-6. rx frame fcs check register bit value state description rx_crc_valid 0 fcs is not valid 1 fcs is valid
89 8111c?mcu wireless?09/09 at86rf231 8.3 received si gnal strength i ndicator (rssi) the received signal strength indicator is characterized by: ? minimum rssi level is -91 dbm (rssi_base_val) ? dynamic range is 81 db ? minimum rssi value is 0 ? maximum rssi value is 28 8.3.1 overview the rssi is a 5-bit value indicating the receive power in the selected channel, in steps of 3 db. no attempt is made to distinguish ieee 802.15. 4 signals from others, only the received signal strength is evaluated. the rssi provides the basis for an ed measurement, see section 8.4 ?energy detection (ed)? on page 91 . 8.3.2 reading rssi in basic operating mode the rssi value is valid in any receive state, and is updated every t tr25 = 2 s to register 0x06 (phy_rssi). it is not recommended to read the rssi value when using the extended operating mode. the automatically generated ed value should be used alternatively, see section 8.4 ?energy detec- tion (ed)? on page 91 . 8.3.3 data interpretation the rssi value is a 5-bit value indicating the receive power, in steps of 3 db and with a range of 0-28. an rssi value of 0 indicates a receiver rf input power of p rf < -91 dbm. for an rssi value in the range of 1 to 28, the rf input power can be calculated as follows: p rf = rssi_base_val + 3 * (rssi -1) [dbm]
90 8111c?mcu wireless?09/09 at86rf231 figure 8-4. mapping between rssi value and received input power 8.3.4 register description register 0x06 (phy_rssi): ? bit 7 - rx_crc_valid refer to register description in section 8.2.5 ?register description? on page 87 . ? bit [6:5] - rnd_value refer to register de scription in section section 11.2.2 ?register description? on page 136 . ? bit [4:0] - rssi the result of the automated rssi measurement is stored in register bits rssi. the value is updated every 2 s in receive states. the read value is a number between 0 and 28 indicating the received signal strength as a linear curve on a logarithmic input power scale (dbm) with a resolution of 3 db. an rssi value of 0 indicates an rf input power of p rf < -91 dbm (see parameter 12.7.16), a value of 28 a power of p rf 10 dbm (see parameter 12.7.18). measured ideal 0 2 4 6 8 1012141618202224262830 rssi -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 receiver input power p rf [dbm] b i t 7 6 5 43210 +0x06 rx_crc_valid rnd_value rssi phy_rssi r e a d / w r i t e r r r rrrrr reset value 0 0 0 0 0 0 0 0
91 8111c?mcu wireless?09/09 at86rf231 8.4 energy detection (ed) the energy detection (ed) module is characterized by: ? 85 unique energy levels defined ? 1 db resolution 8.4.1 overview the receiver ed measurement is used by the netwo rk layer as part of a channel selection algo- rithm. it is an estimation of the received signal power within the bandwidth of an ieee 802.15.4 channel. no attempt is made to identify or deco de signals on the channel. the ed value is cal- culated by averaging rssi values over eight symbols (128 s). for high data rate modes the automated ed me asurement duration is reduced to 32 s, refer to section 11.3 ?high data rate modes? on page 137 . for manually initiated ed measurements in these modes the measur ement period is still 128 s as long as the receiver is in rx_on state. 8.4.2 measurement description there are two ways to initiate an ed measurement: ? manually, by writing an arbitrary value to register 0x07 (phy_ed_level), or ? automatically, after detection of a valid shr of an incoming frame. for manually initiated ed measurements the radio transceiver needs to be in one of the states rx_on or busy_rx state. the end of the ed measurement is indicated by an interrupt irq_4 (cca_ed_done). an automated ed measurement is started if an shr is detected. the end of the automated measurement is not signaled by an interrupt. the measurement result is stored after t tr26 = 140 s (128 s measurement duration and pro- cessing delay) in register 0x07 (phy_ed_level). thus by using basic operating mode, a valid ed value from the currently received frame is accessible 108 s after irq_2 (rx_start) and remains valid until a new rx_start interrupt is generated by the next incoming frame or until another ed measurement is initiated. by using the extended operating mode, it is recommended to mask irq_2 (rx_start), thus the interrupt cannot be used as timing referenc e. a successful frame reception is signalized by interrupt irq_3 (trx_end). the minimum time span between a trx_end interrupt and a fol- lowing sfd detection is t tr27 = 96 s due to the length of the shr. including the ed measurement time, the ed value needs to be read within 224 s after the trx_end interrupt; otherwise, it could be overwritten by the result of the next measurement cycle. this is important for time critical applications or if interrupt irq_2 (rx_start) is not used to indicate the recep- tion of a frame. note, it is not recommended to manually initiate an ed measurement when using the extended operating mode. the values of the register 0x07 (phy_ed_level) are: table 8-7. register bit phy_ed _level interpretation phy_ed_level description 0xff reset value 0x00.... 0x54 ed measurement resu lt of the last ed measurement
92 8111c?mcu wireless?09/09 at86rf231 8.4.3 data interpretation the phy_ed_level is an 8-bit register. the ed value of the at86rf231 has a valid range from 0x00 to 0x54 with a resolution of 1 db. all other values do not occur; a value of 0xff indi- cates the reset value. a value of phy_ed_lev el = 0 indicates that the measured energy is less than -91 dbm (see parameter 12.7.16 rssi_base_val, section 12.7 ?receiver charac- teristics? on page 160 ). due to environmental conditions (temperature, voltage, semiconductor parameters, etc.) the calculated ed value has a maximum tolerance of 5 db, this is to be con- sidered as constant offset over the measurement range. an ed value of 0 indicates an rf input power of p rf -91 dbm. for an ed value in the range of 0 to 84, the rf input power can be calculated as follows: p rf = -91 + ed [dbm] figure 8-5. mapping between received input power and ed value 8.4.4 interrupt handling interrupt irq_4 (cca_ed_done) is issued at the end of a manually initiated ed measurement. note that an ed request should only be initia ted in receive states. otherwise the radio trans- ceiver generates an irq_4 (cca_ed_done); however no ed measurement was performed. measured ideal 0 102030405060708090 phy_ed_level (register 0x07) -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 receiver input power p rf [dbm]
93 8111c?mcu wireless?09/09 at86rf231 8.4.5 register description register 0x07 (phy_ed_level): the phy_ed_level register contains the result of an ed measurement. ? bit [7:0] - ed_level the minimum ed value (ed_leve l = 0) indicates receiver power less than or equal to rssi_base_val. the range is 84 db with a reso lution of 1 db and an absolute accuracy of 5 db. a manual ed measurement can be initiated by a write access to the register. a value 0xff signals that a measurement has never been started yet (reset value). the measurement duration is 8 symbol periods (128 s) for a data rate of 250 kb/s. for high data rate modes the automated measurement duration is reduced to 32 s, refer to section 11.3 ?high data rate modes? on page 137 . for manually initiate d ed measurements in these modes the meas urement period is still 128 s as long as the receiver is in rx_on state. a value other than 0xff indicates the result of the last ed measurement. b i t 76543210 +0x07 ed_level[7:0] phy_ed_level r e a d / w r i t errrrrrrr r e s e t v a l u e11111111
94 8111c?mcu wireless?09/09 at86rf231 8.5 clear channel assessment (cca) the main features of the clear channel assessment (cca) module are: ? all 4 modes are available as defined by ieee 802.15.4-2006 in section 6.9.9 ? adjustable threshold for energy detection algorithm 8.5.1 overview a cca measurement is used to detect a clear channel. four modes are specified by ieee 802.15.4 - 2006: 8.5.2 configuration and request the cca modes are configurable via register 0x08 (phy_cc_cca). using the basic operating mode, a cca request can be initiated manually by setting cca_request = 1 (register 0x08, phy_cc_cca), if the at86rf231 is in any rx state. the current channel status (cca_status) and the cca completion status (cca_done) are accessible in register 0x01 (trx_status). the cca evaluation is done over eight symbo l periods and the result is accessible t tr28 = 140 s (128 s measurement duration and processing delay) after the request. the end of a manually initiated cca me asurement is indicated by an interrupt irq_4 (cca_ed_done). the sub-register cca_ ed_thres of register 0x09 (cca_t hres) defines the received power threshold of the " energy above threshold " algorithm. the threshold is calculated by rssi_base_val + 2 * cca_ed_thres [dbm]. any re ceived power above this level is inter- preted as a busy channel. note, it is not recommended to manually initiate a cca measurement when using the extended operating mode. table 8-8. cca mode overview cca mode description 1 energy above threshold. cca shall report a busy medium upon detecting any energy above the ed threshold. 2 carrier sense only. cca shall report a busy medium only upon the detection of a signal with the modulation and spreading characteristics of an ieee 802.15.4 compliant signal. the signal strength may be above or below the ed threshold. 0, 3 carrier sense with energy above threshold. cca shall report a busy medium using a logical combination of ? detection of a signal with the modulation and spreading characteristics of this standard and ? energy above the ed threshold. where the logical operator may be configured as either or (mode 0) or and (mode 3).
95 8111c?mcu wireless?09/09 at86rf231 8.5.3 data interpretation the current channel status (cca_status) and the cca completion status (cca_done) are accessible in register 0x01 (trx_status). note, register bits cca_done and cca_status are cleared in response to a cca_request. the completion of a measurement cycle is indi cated by cca_done = 1. if the radio transceiver detected no signal (idle channel) during the measurement cycle, the cca_status bit is set to 1. when using the "energy above threshold" algorithm, any received power above cca_ed_thres level is interpreted as a busy ch annel. the "carrier sense" algorithm reports a busy channel when detecting an ieee 802.15.4 signal above the rssi_base_val (see param- eter 12.7.16). the radio transceiver is also ab le to detect signals below this value, but the detection probability decreases with the signal power. it is almost zero at the radio transceivers sensitivity level (see parameter 12.7.1). 8.5.4 interrupt handling interrupt irq_4 (cca_ed_done) is issued at the end of a ma nually initiated cca measurement. notes ? a cca request should only be initiated in basic operating mode receive states. otherwise the radio transceiver generates an irq_4 (cca_ed_done) and sets the register bit cca_done = 1, even though no cca measurement was performed. ? requesting a cca measurement in busy_rx state and during an ed measurement, an irq_4 (cca_ed_done) could be issued immediately after the request. if in this case register bit cca_done = 0, an additional inte rrupt cca_ed_done is issued after finishing the cca measurement and register bit cca_done is set to 1. 8.5.5 measurement time the response time for a manually initiated cca measurement depends on the receiver state. in rx_on state the cca measurement is done over eight symbol periods and the result is accessible 140 s after the request (see above). in busy_rx state the cca measurement duration depends on the cca mode and the cca request relative to the reception of an shr. th e end of the cca measurement is indicated by an irq_4 (cca_ed_done). the variation of a cca measurement period in busy_rx state is described in table 8-9 on page 95 . table 8-9. cca measurement period and access in busy_rx state cca mode request within ed measurement (1) request after ed measurement 1 energy above threshold. cca result is available after finishing automated ed measurement period. cca result is immediately available after request. 2 carrier sense only. cca result is immediately available after request.
96 8111c?mcu wireless?09/09 at86rf231 note: 1. after receiving the shr an automated ed measurement is st arted with a length of 8 symbol periods (psdu rate 250 kb/s), refer to section 8.4 ?energy detection (ed)? on page 91 . this automated ed measurement must be finished to provide a result for the cca measurement. only one automated ed measurement per frame is performed. it is recommended to perform cca measurements in rx_on state only. to avoid switching accidentally to busy_rx state the shr detection can be disabled by setting register bit rx_pdt_dis (register 0x15, rx_syn), refer to section 9.1 ?receiver (rx)? on page 101 . the receiver remains in rx_on state to perform a cca measurement until the register bit rx_pdt_dis is set back to continue the frame reception. in this case the cca measurement duration is 8 symbol periods. 3 carrier sense with energy above threshold (and). cca result is available after finishing automated ed measurement period. cca result is immediately available after request. 0 carrier sense with energy above threshold (or). cca result is available after finishing automated ed measurement period cca result is immediately available after request. table 8-9. cca measurement period and access in busy_rx state
97 8111c?mcu wireless?09/09 at86rf231 8.5.6 register description register 0x01 (trx_status): two register bits of register 0x01 (trx_statu s) signal the status of the cca measurement. ? bit 7 - cca_done this register indicates if a cca request is comp leted. this is also in dicated by an interrupt irq_4 (cca_ed_done). note, register bit cca_done is cleared in response to a cca_request. ? bit 6 - cca_status after a cca request is completed the result of the cca measurement is available in register bit cca_status. note, register bi t cca_status is cleared in response to a cca_request. ? bit 5 - reserved ? bit [4:0] - trx_status refer to section 7.1.5 ?register description? on page 44 and section 7.2.7 ?register descrip- tion - control registers? on page 68 . register 0x08 (phy_cc_cca): this register is provided to initiate and control a cca measurement. ? bit 7 - cca_request a manual cca measurement is initiated with setting cca_request = 1. the end of the cca measurement is indicated by interrupt irq_4 (cca_ed_done). register bits cca_done and bit 7 6 5 4 3 2 1 0 +0x01 cca_done cca_status reserved trx_status trx_status read/write r r r r r r r r reset value 0 0 0 0 0 0 0 0 table 8-10. cca algorithm status register bit value state description cca_done 0 cca calculation not finished 1 cca calculation finished table 8-11. cca status result register bit value state description cca_status 0 channel indicated as busy 1 channel indicated as idle bit 7 6 5 4 3 2 1 0 +0x08 cca_request cca_mode channel phy_cc_cca read/write w r/w r/w r/w r/w r/w r/w r/w reset value 0 0 1 0 1 0 1 1
98 8111c?mcu wireless?09/09 at86rf231 cca_status (register 0x01, trx_status) are updated after a cca_request. the regis- ter bit is automatically cleared after requesting a cca measurement with cca_request = 1. ? bit [6:5] - cca_mode the cca mode can be selected using register bits cca_mode. note that ieee 802.15.4-2006 cca mode 3 defines the logical combination of cca mode 1 and 2 with the logical operators and or or. this can be selected with: ? bit [4:0] - channel refer to section 9.7 ?frequency synthesizer (pll)? on page 121 . register 0x09 (cca_thres): this register sets the ed threshold level for cca. ? bit [7:5] - reserved ? bit [4:0] - cca_ed_thres the cca mode 1 request indicates a busy channel if the measured received power is above rssi_base_val + 2 * cca_ed_thres [dbm]. cca modes 0 and 3 are logi cal related to this result. table 8-12. cca status result register bit value state description cca_mode 0 mode 3a, carrier sense or energy above threshold 1 mode 1, energy above threshold 2 mode 2, carrier sense only 3 mode 3b, carrier sense and energy above threshold ?cca_mode = 0 for logical operation or, and ?cca_mode = 3 for logical operation and. bit 7 6 5 4 3 2 1 0 +0x09 reserved cca_ed_thres cca_thres read/write r/w r/w r/w r/w r/w r/w r/w r/w reset value 1 1 0 0 0 1 1 1
99 8111c?mcu wireless?09/09 at86rf231 8.6 link quality indication (lqi) according to ieee 802.15.4, the lqi measurement is a characterization of the strength and/or quality of a received packet. the measurement may be implemented using receiver ed, a sig- nal-to-noise ratio estimation, or a combination of these methods. the use of the lqi result by the network or application layers is not specified in this standard. lqi values shall be an integer ranging from 0x00 to 0xff. the minimum and maximum lqi values (0x00 and 0xff) should be associated with the lowest and highest quality compliant signals, respectively, and lqi values in between should be uniformly distributed between these two limits. 8.6.1 overview the lqi measurement of the at86rf231 is implemented as a measure of the link quality which can be described with the packet error rate (per) for this link. an lqi value can be associated with an expected packet error rate. the per is the ratio of erroneous received frames to the total number of received frames. a per of zero indicates no frame error, whereas at a per of one no frame was received correctly. the radio transceiver uses correlation results of multiple symbols within a frame to determine the lqi value. this is done for each received frame. the minimum frame length for a valid lqi value is two octets psdu. lqi values are integers ranging from 0 to 255. as an example, figure 8-6 on page 99 shows the conditional packet error when receiving a cer- tain lqi value. figure 8-6. conditional packet error rate versus lqi the values are taken from received frames of psdu length of 20 octets on transmission chan- nels with reasonable low multipath delay spreads. if the transmission channel characteristic has higher multipath delay spread than assumed in the example, the per is slightly higher for a cer- 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 50 100 150 200 250 per lqi
100 8111c?mcu wireless?09/09 at86rf231 tain lqi value. since the packet error rate is a statistical value, the per shown in section 8-6 ?conditional packet error rate versus lqi? on page 99 is based on a huge number of transac- tions. a reliable estimation of the packet error rate cannot be based on a single or a small number of lqi values. 8.6.2 request an lqi measurement the lqi byte can be obtained after a frame has been received by the radio transceiver. one additional byte is automatically attached to the received frame containing the lqi value. this information can also be read via frame buffer read access, see section 6.2.2 ?frame buffer access mode? on page 20 . the lqi byte can be read after irq_3 (trx_end) interrupt. 8.6.3 data interpretation according to ieee 802.15.4 a low lqi value is associated with low signal strength and/or high signal distortions. signal distortions are mainly caused by interference signals and/or multipath propagation. high lqi values indicate a sufficient high signal power and low signal distortions. note, the received signal power as indicated by received signal strength indication (rssi) value or energy detection (ed) value of the at86rf231 do not characterize the signal quality and the ability to decode a signal. as an example, a received signal with an input power of about 6 db above the receiver sensitiv- ity likely results in a lqi value close to 255 fo r radio channels with very low signal distortions. for higher signal power the lqi value becomes independent of the actual signal strength. this is because the packet error rate for these scenarios tends towards zero and further increased signal strength, i.e. increasing the transmission power does not decrease the error rate any fur- ther. in this case rssi or ed can be used to evaluate the signal strength and the link margin. zigbee networks often require the identification of the "best" routing between two nodes. both, the lqi and the rssi/ed can be used for this, dependent on the optimization criteria. if a low packet error rate (corresponding to high throughput) is the optimization criteria then the lqi value should be taken into consideration. if a lo w transmission power or the link margin is the optimization criteria then the rssi/ed value is also helpful. combinations of lqi, rssi and ed are possible for routing decisions. as a rule of thumb rssi and ed values are useful to differentiate between links with high lqi values. transmission links with low lqi values should be discarded for routing decisions even if the rssi/ed values are high. this is because rssi/ed do es not say anything about the possibility to decode a signal. it is only an information about the received signal strength whereas the source can be an interferer.
101 8111c?mcu wireless?09/09 at86rf231 9. module description 9.1 receiver (rx) 9.1.1 overview the at86rf231 receiver is split into an analog radio front end and a digital base band proces- sor (rx bbp), see figure 9-1 on page 101 . figure 9-1. receiver block diagram the differential rf signal is amplified by a low noise amplifier (lna), filtered (ppf) and down converted to an intermediate frequency by a mixer. channel selectivity is performed using an integrated band pass filter (bpf). a limiting amplifier (limiter) provides sufficient gain to over- come the dc offset of the succeeding analog-to-digital converter (adc) and generates a digital rssi signal. the adc output signal is sampled and processed further by the digital base band receiver (rx bbp). the rx bbp performs additional signal filtering and signal synchronizati on. the frequ ency offset of each frame is calculated by the synchronization unit and is used during the remaining receive process to correct the offset. the receiver is designed to handle frequency and symbol rate devi- ations up to 120 ppm, caused by combined receiver and transmitter deviations. for details refer to section 12.5 ?general rf specifications? on page 158 parameter 12.5.8. finally the sig- nal is demodulated and the data are stored in the frame buffer. in basic operating mode, refer to section 7.1 ?basic operating mode? on page 33 , the reception of a frame is indicated by an interrupt irq_2 (rx_start). accordingly its end is signalized by an interrupt irq_3 (trx_end). based on the quality of the received signal a link quality indica- tor (lqi) is calculated and appended to the frame, refer to section 8.6 ?link quality indication (lqi)? on page 99 . additional signal processing is appl ied to the frame data to provide further status information like ed va lue (register 0x07, ed_level) and fcs correctness (register 0x06, phy_rssi). beyond these features the extended operating mode of the at86rf231 supports address filter- ing and pending data indication. for details refer to section 7.2 ?extended operating mode? on page 47 . lna ppf bpf limiter adc agc rssi rfp rfn analog domain digital domain spi rx bbp frame buffer lo control, registers spi i/f c i/f
102 8111c?mcu wireless?09/09 at86rf231 9.1.2 frame receive procedure the frame receive procedure including the radio transceiver setup for reception and reading psdu data from the frame buffer is described in section 10.1 ?frame receive procedure? on page 126 . 9.1.3 configuration in basic operating mode the receiver is enabled by writing command rx_on to register bits trx_cmd (register 0x02, trx_state) in states trx_off or pll_on. similarly in extended operating mode, the receiver is enabled for rx_aack operation from states trx_off or pll_on by writing the command rx_aack_on. t here is no additional configuration required to receive ieee 802.15.4 compliant frames when using the basic operating mode. however, the frame reception in the extended operating mode requires further register configurations, for details refer to section 7.2 ?extended operating mode? on page 47 . the at86rf231 receiver has an outstanding sensitivity performance of -101 dbm. at certain environmental conditions or for high data rate modes, refer to section 11.3 ?high data rate modes? on page 137 , it may be useful to manually decrease this sensitivity. this is achieved by adjusting the synchronization header detector threshold using register bits rx_pdt_level (register 0x15, rx_syn). received signals with an rssi value below the threshold do not acti- vate the demodulation process. furthermore, it may be useful to protect a received frame against overwriting by subsequent received frames. a dynamic frame buffer protection is enabled with register bit rx_safe_mode (register 0x0c, trx_ctrl_2) set, see section 11.8 ?dynamic frame buffer protection? on page 154 . the receiver remains in rx_on or rx_aack_on state until the whole frame is read by the microcontroller, indicated by /sel = h during the spi frame receive mode. the frame buffer content is only protected if the fcs is valid. a static frame buffer protection is enabled with register bit rx_pdt_dis (register 0x15, rx_syn) set. the receiver remains in rx_o n or rx_aack_on state and no further shr is detected until the register bit rx_pdt_dis is set back.
103 8111c?mcu wireless?09/09 at86rf231 9.1.4 register description register 0x15 (rx_syn): this register controls the sensitivity threshold of the receiver. ? bit 7 - rx_pdt_dis rx_pdt_dis = 1 prevents the reception of a frame even if the radio transceiver is in receive modes. an ongoing frame reception is not affected. this operation mode is independent of the setting of register bits rx_pdt_level. ? bit [6:4] - reserved ? bit [3:0] - rx_ pdt_level these register bits desensitize the receiver su ch that frames with an rssi level below the rx_pdt_level threshold level (i f rx_pdt_level > 0) are not received. the threshold level can be calculated according to the following formula: rx_thres = rssi_base_val + 3 * (rx_pd t_level -1), for rx_pdt_level > 0 examples for certain register settings are given in table 9-1 on page 103 if register bits rx_pdt_level > 0 the current co nsumption of the receiv er in states rx_on and rx_aack_on is reduced by 500 a, refer to section 12.8 ?current consumption specifi- cations? on page 161 parameter 12.8.4. if register bits rx_pdt_level = 0 (reset value) all frames with a valid shr and phr are received, independently of their signal strength. bit 76 543 2 1 0 +0x15 rx_pdt_dis reserved rx_pdt_level rx_syn read/write r/w r r r r/w r/w r/w r/w reset value 00 000 0 0 0 table 9-1. receiver desensitization th reshold level - rx_pdt_level value [register] rx input threshold level value [dbm] 0x0 rssi_base_val (reset value) rssi value not considered 0x1 > rssi_base_val + 0 * 3 > -90 ... 0xe > rssi_base_val + 13 * 3 > -51 0xf > rssi_base_val + 14 * 3 > -48
104 8111c?mcu wireless?09/09 at86rf231 9.2 transmitter (tx) 9.2.1 overview the at86rf231 transmitter consists of a di gital base band processor (tx bbp) and an analog radio front end, see figure 9-2 on page 104 . figure 9-2. transmitter block diagram the tx bbp reads the frame data from the fram e buffer and performs the bit-to-symbol and symbol-to-chip mapping as specified by ieee 802.15.4 in section 6.5.2. the o-qpsk modula- tion signal is generated and fed into the analog radio front end. the fractional-n frequency synthe sizer (pll) converts the baseban d transmit signal to the rf signal, which is amplified by the power amplifier (pa). the pa output is internally connected to bidirectional differential antenna pins (rfp, rfn), so that no external antenna switch is needed. 9.2.2 frame transmit procedure the frame transmit procedure including writing psdu data in the frame buffer and initiating a transmission is described in section 10.2 ?frame transmit procedure? on page 127 , frame transmit procedure. 9.2.3 configuration the maximum output power of the transmitter is ty pically +3 dbm. the output power can be con- figured via register bits tx_pwr (register 0x05, phy_tx_pwr). the output power of the transmitter can be controlled over a range of 20 db. a transmission can be started from pll_on or tx_aret_on state by a rising edge of pin slp_tr or by writing tx_start command to register bits trx_cmd (register 0x02, trx_state). 9.2.4 tx power ramping to optimize the output power spectral density (psd), the pa buffer and pa are enabled sequen- tially. this is illustrated by a timing example using default settings, shown in figure 9-3 on page 105 . in this example the transmission is initiate d with the rising edge of pin 11 (slp_tr). the radio transceiver state changes from pll_on to busy_tx. the modulation starts 16 s after slp_tr. pll ? tx modulation pa ext. rf front-end and output power control spi i/f dig3/4 rfp rfn tx data analog domain digital domain tx bbp frame buffer control, registers spi c i/f buf
105 8111c?mcu wireless?09/09 at86rf231 figure 9-3. tx power ramping when using an external rf front-end (refer to section 11.5 ?rx/tx indicator? on page 147 ) it may be required to adjust the startup time of the external pa relative to the internal building blocks to optimize the overall psd. this can be achieved using register bits pa_buf_lt and pa_lt. 9.2.5 register description register 0x05 (phy_tx_pwr): this register controls the output power and the ramping of the transmitter. ? bit [7:6] - pa_buf_lt these register bits control the enable lead time of the internal pa buffer relative to the enable time of the internal pa. this time is further used to derive a control signal for an external rf front-end to switch between receive and transmit, for details refer to section 11.5 . 0 6810 slp_tr trx_state pll_on 2 12 14 16 18 length [s] pa buffer 4 pa pa_buf_lt pa_lt modulation 11 11 11 00 0 busy_tx bit 7 6 5 4 3 2 1 0 +0x05 pa_buf_lt pa_lt tx_pwr phy_tx_pwr read/write r/w r/w r/w r/w r/w r/w r/w r/w reset value 1 1 0 0 0 0 0 0 table 9-2. pa buffer enable time relative to the pa register bits value pa buffer lead time [s] pa_buf_lt 0 0 12 24 3 6
106 8111c?mcu wireless?09/09 at86rf231 ? bit [5:4] - pa_lt these register bits control the enable lead time of the internal pa relative to the beginning of the transmitted frame. ? bit [3:0] - tx_pwr these register bits determine the tx output power of the at86rf231. table 9-3. pa enable time relative to the start of the frame (shr) register bits value pa lead time [s] pa_lt 0 2 14 26 38 table 9-4. at86rf231 tx output power setting register bits value tx output power [dbm] tx_pwr 0x0 3.0 0x1 2.8 0x2 2.3 0x3 1.8 0x4 1.3 0x5 0.7 0x6 0.0 0x7 -1 0x8 -2 0x9 -3 0xa -4 0xb -5 0xc -7 0xd -9 0xe -12 0xf -17
107 8111c?mcu wireless?09/09 at86rf231 9.3 frame buffer the at86rf231 contains a 128 byte dual port sram. one port is connected to the spi inter- face, the other to the internal transmitter and receiver modules. for data communication, both ports are independent and simultaneously accessible. the frame buffer uses the address space 0x00 to 0x7f for rx and tx operation of the radio transceiver and can keep one ieee 802.15.4 rx or one tx frame of maximum length at a time. frame buffer access modes are described in section 6.6.2 ?register description? on page 30 . frame buffer access conflicts are indicated by an under run interrupt irq_6 (trx_ur). note that this interrupt also occurs on the attempt to write frames longer than 127 octets to the frame buffer. in that case the content of the frame buffer cannot be guaranteed. frame buffer access is only possible if the digita l voltage regulator is turned on. this is valid in all device states except in sleep state. an a ccess in p_on state is possible if pin 17 (clkm) provides the 1 mhz master clock. 9.3.1 data management data in frame buffer (received data or data to be transmitted) remains valid as long as: ? no new frame or other data are written into the buffer over spi ? no new frame is received (in any busy_rx state) ? no state change into sleep state is made ? no reset took place by default there is no protection of the frame buffer against overwriting. therefore, if a frame is received during frame buffer read access of a previously received frame, interrupt irq_6 (trx_ur) is issued and the stored data might be overwritten. even so, the old frame data can be read, if the spi data rate is higher than the effective over air data rate. for a data rate of 250 kb/s a minimum spi clock rate of 1 mhz is recommended. finally the microcontroller should check the transferred frame data integrity by an fcs check. to protect the frame buffer content against bei ng overwritten by newly incoming frames the radio transceiver state should be changed to pll_on state after reception. this can be achieved by writing immediately the command pll_on to register bits trx_cmd (register 0x02, trx_state) after receiving the frame, indicated by irq_3 (trx_end). alternatively dynamic frame buffer protection can be used to protect received frames against overwriting, for details refer to section 11.8 ?dynamic frame buffer protection? on page 154 . both procedures do not protect the frame buffer from overwriting by the microcontroller. in extended operating mode during tx_aret operation, see section 7.2.4 ?tx_aret_on - transmit with automatic retry and csma-ca retry? on page 64 , the radio transceiver switches to receive, if an acknowledgement of a previous ly transmitted frame was requested. during this period received frames are evaluated, but not stored in the frame buffer. this allows the radio transceiver to wait for an acknowledgement frame and retry the frame transmission without writ- ing them again. a radio transceiver state change, except a transiti on to sleep state or a reset, does not affect the frame buffer contents. if the radio transceiver is forced into sleep, the frame buffer is powered off and the stored data gets lost.
108 8111c?mcu wireless?09/09 at86rf231 9.3.2 user accessible frame content the at86rf231 supports an ieee 802.15.4 compliant frame format as shown in figure 9-4 on page 108 . figure 9-4. at86rf231 frame structure notes: 1. stored into frame buffer for tx operation 2. stored into frame buffer during frame reception. a frame comprises two sections, the radio transceiver internally generated shr field and the user accessible part stored in the frame buffer. the shr contains the preamble and the sfd field. the variable frame section contains the phr and the psdu including the fcs, see sec- tion 8.2 ?frame check sequence (fcs)? on page 85 . the frame buffer content differs depending on the direction of the communication (receive or transmit). to access the data follow the procedures described in section 6.2.2 ?frame buffer access mode? on page 20 . during frame reception, the payload and the link quality indicator (lqi) value of a successfully received frame are stored in the frame buffer. the radio transceiver appends the lqi value to the frame data after the last received octet. the frame length information is not stored in the frame buffer. when using the frame buffer access mode to read the frame buffer content, the frame length information is placed before the payload. if the sram read access is used to read an rx frame, the frame length field (phr) cannot be accessed. the shr (except the sfd used to generate the shr) can generally not be read by the microcontroller. for frame transmission, the phr and the psdu needs to be stored in the frame buffer. the phr byte is the first byte in the frame buffer and must be calculated based on the phr and the psdu. the maximum frame size supported by t he radio transceiver is 128 bytes. if the tx_auto_crc_on bit is set in register 0x05 (phy_tx_pwr), the fcs field of the psdu is replaced by the automatically calculated fcs du ring frame transmission. that's why there is no need to write the fcs field when using the automatic fcs generation. to manipulate individual bytes of the frame buffer a sram write access can be used instead. for non ieee 802.15.4 compliant frames, the minimum frame length supported by the radio transceiver is one byte (frame length field + 1 byte of data). preamble sequence sfd phr (1) payload lqi (2) fcs 0 4 5 6 n + 3 n + 5 n + 6 frame access shr not accesible rx: frame buffer content phy generated length [octets] duration 4 octets / 128 s 1 n octets / n ? 32 s ( n <= 128) 1 tx: frame buffer content
109 8111c?mcu wireless?09/09 at86rf231 9.3.3 interrupt handling access conflicts may occur when reading and wr iting data simultaneously at the two indepen- dent ports of the frame buffer, tx/rx bbp and spi . both of these ports have their own address counter that points to the frame buffer's current address. access violations occurs during concurrent frame buffer read or write accesses, when the spi port's address co unter value becomes highe r than or equal to th at of tx/rx bbp port. while receiving a frame, primarily the data needs to be stored in the frame buffer before read- ing it. this can be ensured by accessing the frame buffer 32 s after irq_2 (rx_start) at the earliest. when reading the frame data continuously the spi data rate shall be lower than 250 kb/s to ensure no under run interrupt occurs. to avoid access conflicts and to simplify the frame buffer read access frame buffer empty indication may be used, for details refer to section 11.7 ?frame buffer empty indicator? on page 152 . while transmitting an access violation occurs during a frame buffer write access, when the spi port's address co unter value becomes less than or equal to that of tx bbp port. both these access violations may cause data corruption and are indicated by irq_6 (trx_ur) interrupt when using the frame buffer access mode. access violations are not indicated when using the sram access mode. notes ? interrupt irq_6 (trx_ur) is valid 64 s after irq_2 (rx_start). the occurrence of the interrupt can be disregarded when reading the first byte of the frame buffer between 32 s and 64 s after the rx_start interrupt. ? if a frame buffer read access is not finished until a new frame is received, a trx_ur interrupt occurs. nevertheless the old frame data can be read, if the spi data rate is higher than the effective phy data rate. a minimum spi clock rate of 1 mhz is recommended in this case. finally, the microcontroller should check the integrity of the transferred frame data by calculating the fcs. ? when writing data to the frame buffer during frame transmission, the spi data rate shall be higher than the phy data rate to ensure no under run interrupt. the first byte of the psdu data must be available in the frame buffer before sfd transmission is complete, which takes 176 s (16 s pa ramp up + 160 s shr) from the rising edge of slp_tr pin (see figure 7- 2 on page 39 ).
110 8111c?mcu wireless?09/09 at86rf231 9.4 voltage regulators (avreg, dvreg) the main features of the voltage regulator blocks are: ? bandgap stabilized 1.8v supply for analog and digital domain ? low dropout (ldo) voltage regulator ? configurable for usage of external voltage regulator 9.4.1 overview the internal voltage regulators supply a stabilized voltage to the at86rf231. the avreg pro- vides the regulated 1.8v supply voltage for the analog section and the dvreg supplies the 1.8v supply voltage for the digital section. a simplified schematic of the internal voltage regulator is shown in figure 9-5 on page 110 . figure 9-5. simplified schematic of avreg/dvreg the voltage regulators require bypass capacitors for stable operation. the value of the bypass capacitors determine the settling time of the vo ltage regulators. the bypass capacitors shall be placed as close as possible to the pins and sha ll be connected to ground with the shortest possi- ble traces. 9.4.2 configuration the voltage regulators can be configured by the register 0x10 (vreg_ctrl). it is recommended to use the internal regulators, but it is also possible to supply the low voltage domains by an external voltage supply. for this configuration, the internal regulators need to be switched off by setting the register bits to the values avreg_ext = 1 and dvreg_ext = 1. a regulated external supply voltage of 1.8v needs to be connected to the pins 13, 14 (dvdd) and pin 29 (avdd). when turning on th e external supply, ensure a suff iciently long stabilization time before interacting with the at86rf231. 9.4.3 data interpretation the status bits avdd_ok = 1 and dvdd_ok = 1 of register 0x10 (vreg_ctrl) indicate an enabled and stable internal supply voltage. reading value 0 indicates a disabled or internal sup- ply voltage not settled to the final value. bandgap voltage reference 1.25v avdd, dvdd (d)evdd
111 8111c?mcu wireless?09/09 at86rf231 9.4.4 register description register 0x10 (vreg_ctrl): this register controls the use of the voltage regulators and indicates the status of these. ? bit 7 - avreg_ext if set this register bit disables the internal analog voltage regulator to apply an external regulated 1.8v supply for the analog building blocks. ?bit 6 - avdd_ok this register bit indicates if the internal 1.8v regulated voltage supply avdd has settled. the bit is set to logic high, if avreg_ext = 1. ? bit [5:4] - reserved ? bit 3 - dvreg_ext if set this register bit disables the internal digi tal voltage regulator to apply an external regulated 1.8v supply for the digital building blocks. bit 76 5 4 3 2 1 0 +0x10 avreg_ext avdd_ok reserved dvreg_ext dvdd_ok reserved vreg_ctrl read/write r/w r r/w r/w r/w r r/w r/w reset value 00 0 0 0 0 0 0 table 9-5. regulated voltage supply cont rol for analog building blocks register bit value description avreg_ext 0 internal voltage regulator enabled, analog section 1 internal voltage regulator disabled, use external regulated 1.8v supply voltage for the analog section table 9-6. regulated voltage supply cont rol for analog building blocks register bit value description avdd_ok 0 analog voltage regulator disabled or supply voltage not stable 1 analog supply voltage has settled table 9-7. regulated voltage supply cont rol for digital building blocks register bit value description dvreg_ext 0 internal voltage regulator enabled, digital section 1 internal voltage regulator disabled, use external regulated 1.8v supply voltage for the digital section
112 8111c?mcu wireless?09/09 at86rf231 ? bit 2 - dvdd_ok this register bit indicates if the internal 1.8v regulated voltage supply dvdd has settled. the bit is set to logic high, if dvreg_ext = 1. note ? while the reset value of this bit is 0, any practi cal access to the register is only possible when dvreg is active. so this bit is normally always read out as 1. ? bit [1:0] - reserved table 9-8. regulated voltage supply cont rol for digital building blocks register bit value description dvdd_ok 0 digital voltage regulator disabl ed or supply voltage not stable 1 digital supply voltage has settled
113 8111c?mcu wireless?09/09 at86rf231 9.5 battery monitor (batmon) the main features of the battery monitor are: ? configurable voltage threshold range: 1.7v to 3.675v ? generates an interrupt when supply voltage drops below a threshold 9.5.1 overview the battery monitor (batmon) detects and indicates a low supply voltage of the external supply voltage at pin 28 (evdd). this is done by comparing the voltage on the external supply pin 28 (evdd) with a configurable internal threshold voltage. a simplified schematic of the batmon with the most important input and output signals is shown in figure 9-6 on page 113 . figure 9-6. simplified schematic of batmon 9.5.2 configuration the batmon can be configured using the regi ster 0x11 (batmon). register subfield batmon_vth sets the threshold voltage. it is conf igurable with a resolution of 75 mv in the upper voltage range (batmon_hr = 1) and with a resolution of 50 mv in the lower voltage range (batmon_hr = 0), for details refer to register 0x11 (batmon). 9.5.3 data interpretation the signal bit batmon_ok of register 0x11 (batmon) monitors the current value of the bat- tery voltage: ? if batmon_ok = 0, the battery voltage is lower than the threshold voltage ? if batmon_ok = 1, the battery voltage is higher than the threshold voltage after setting a new threshold, the value batmo n_ok should be read out to verify the current supply voltage value. note, the battery monitor is inactive during p_ on and sleep states, see status register 0x01 (trx_status). batmon_hr batmon_vth 4 evdd threshold voltage batmon_ok ?1? batmon_irq for input-to-output mapping see control register 0x11 (batmon) dac + - d q clear
114 8111c?mcu wireless?09/09 at86rf231 9.5.4 interrupt handling a supply voltage drop below the configured threshold value is indicated by an interrupt irq_7 (bat_low), see section 6.6 ?interrupt logic? on page 29 . note that the inte rrupt is issued only if batmon_ok changes from 1 to 0. no interrupt is generated when: ? the battery voltage is under the default 1.8v threshold at power up (batmon_ok was never 1), or ? a new threshold is set, which is still above the current supply voltage (batmon_ok remains 0). when the battery voltage is close to the programmed threshold voltage, noise or temporary volt- age drops may generate unwanted interrupts. to avoid this: ? disable the irq_7 (bat_low) in register 0x0e (irq_mask) and tr eat the battery as empty, or ? set a lower threshold value. 9.5.5 register description register 0x11 (batmon): this register configures the battery monitor to compare the supply voltage at pin 28 (evdd) to the threshold batmon_vth. additionally the supply voltage status at pin 28 (evdd) is accessi- ble by reading register bit batmon_ok according to the actual batmon settings. ? bit [7:6] - reserved ? bit 5 - batmon_ok the register bit batmon_ok indicates the level of the external supply voltage with respect to the programmed threshold batmon_vth. ? bit 4 - batmon_hr batmon_hr sets the range and resolution of the battery monitor. bit 7 6 5 4 3 2 1 0 +0x11 reserved batmon_ok batmon_hr batmon_vth batmon read/write r r r r/w r/w r/w r/w r/w reset value 0 0 0 0 0 0 1 0 table 9-9. battery monitor status register bit value description batmon_ok 0 the battery voltage is below the threshold. 1 the battery voltage is above the threshold. table 9-10. battery monitor range selection register bit value description batmon_hr 0 enables the low range, see batmon_vth 1 enables the high range, see batmon_vth
115 8111c?mcu wireless?09/09 at86rf231 ? bit [3:0] - batmon_vth the threshold values for the battery monito r are set by register bits batmon_vth: table 9-11. battery monitor threshold voltage value batmon_vth[3:0] voltag e [v] batmon_hr = 1 voltag e [v] batmon_hr = 0 0x0 2.550 1.70 0x1 2.625 1.75 0x2 2.700 1.80 0x3 2.775 1.85 0x4 2.850 1.90 0x5 2.925 1.95 0x6 3.000 2.00 0x7 3.075 2.05 0x8 3.150 2.10 0x9 3.225 2.15 0xa 3.300 2.20 0xb 3.375 2.25 0xc 3.450 2.30 0xd 3.525 2.35 0xe 3.600 2.40 0xf 3.675 2.45
116 8111c?mcu wireless?09/09 at86rf231 9.6 crystal osci llator (xosc) the main crystal osc illator features are: ? 16 mhz amplitude controlled crystal oscillator ? 330 s typical settling ti me after leaving sleep state ? configurable trimming capacitance array ? configurable clock output (clkm) 9.6.1 overview the crystal oscillator generates the reference frequency for the at86rf231. all other internally generated frequencies of the radio transceiver are derived from this unique frequency. there- fore, the overall system performance is mainly determined by the accuracy of crystal reference frequency. the external components of the crystal oscillator should be selected carefully and the related board layout should be done with caution (see section 5. ?application circuits? on page 12 ). the register 0x12 (xosc_ctrl) provides access to the control signals of the oscillator. two operating modes are supp orted. it is recomme nded to use the integrated oscillator setup as described in figure 9-7 on page 116 ; nevertheless a reference frequency can be fed to the inter- nal circuitry by using an external clock reference as shown in figure 9-8 on page 117 . 9.6.2 integrated oscillator setup using the internal osc illator, the oscillation frequency d epends on the load capacitance between the crystal pins xtal1 and xtal2. the total load capacitance c l must be equal to the specified load capacitance of the crystal itself. it consists of the external capacitors cx and parasitic capacitances connected to the xtal nodes. figure 9-7 on page 116 shows all parasitic capacitances, such as pcb stray capacitances and the pin input capacitance, summarized to c par . figure 9-7. simplified xosc schemati c with external components additional internal trimming capacitors c trim are available. any value in the range from 0 pf to 4.5 pf with a 0.3 pf resolution is selectable using xtal_trim of register 0x12 (xosc_ctrl). cx cx 16mhz xtal2 xtal1 evdd c trim c trim c par c par at86rf231 pcb xtal_trim[3:0] evdd v dd xtal_trim[3:0]
117 8111c?mcu wireless?09/09 at86rf231 to calculate the total load capacitance, the following formula can be used: c l = 0.5 * (cx + c trim + c par ). the trimming capacitors provide the possibility of reducing frequency de viations caused by pro- duction process variations or by external components tolerances. note that the oscillation frequency can only be reduced by increasing the trimming capacitance. the frequency deviation caused by one step of c trim decreases with increasing crystal load capacitor values. an amplitude control circuit is included to ensure stable operation under different operating con- ditions and for different crystal types. enabling the crystal osc illator in p_on state and after leaving sleep state causes a slig htly higher current during t he amplitude buil d-up phase to guarantee a short start-up time. at stable operation, the current is reduced to the amount neces- sary for a robust operation. this also keeps the drive level of the crystal low. generally, crystals with a higher load capacitance are less sensitive to parasitic pulling effects caused by external component variations or by va riations of board and circuit parasitics. on the other hand, a larger crystal load capacitance results in a longer start-up time and a higher steady state current consumption. 9.6.3 external reference frequency setup when using an external reference frequency, the signal must be connected to pin 26 (xtal1) as indicated in figure 9-8 on page 117 and the register bits xtal_mode (register 0x12, xosc_ctrl) need to be set to the external oscillato r mode. the oscillation peak-to-peak ampli- tude shall be between 100 mv and 500 mv, the optimum range is between 400 mv and 500 mv. pin 25 (xtal2) should not be wired. figure 9-8. setup for using an external frequency reference 9.6.4 master clock signal output (clkm) the generated reference clock signal can be fed to a microcontroller using pin 17 (clkm). the internal 16 mhz raw clock can be divided by an internal prescaler. thus, clock frequencies of 16 mhz, 8 mhz, 4 mhz, 2 mhz, 1 mhz, 250 khz, or 62.5 khz can be supplied by pin clkm. the clkm frequency, update scheme, and pin dr iver strength is configurable using register 0x03 (trx_ctrl_0). there are two possibilities how a clkm frequency change gets effective. if clkm_sha_sel = 0 and/or clkm_ctrl = 0, changing the register bits clkm_ctrl imme- diately affects the clkm clock rate. otherwise (clkm_sha_sel = 1 and clkm_ctrl > 0 before changing the register bits clkm_ctrl) the new clock rate is su pplied when leaving the sleep state the next time. to reduce power consumption and spurious emissions, it is recommended to turn off the clkm clock when not in use or to reduce its dr iver strength to a minimum, refer to section 1.3 ?digital pins? on page 7 . xtal2 xtal1 at86rf231 pcb 16 mhz
118 8111c?mcu wireless?09/09 at86rf231 note: ? during reset procedure, see section 7.1.2.8 ?reset state? on page 37 , register bits clkm_ctrl are shadowed. although the clock setting of clkm rema ins after reset, a read access to register bits clkm_ctrl delivers the reset value 1. for that re ason it is recommended to write the previous configuration (before reset) to register bits clkm _ctrl (after reset) to align the radio transceiver behavior and register configuration. otherwise the clkm clock rate is set back to the reset value (1 mhz) after the next sleep cycle. ? for example, if the clkm clock rate is configured to 16 mhz the clkm clock rate remains at 16 mhz after a reset, however the register bits clkm_ctrl are set back to 1 . since clkm_sha_sel reset value is 1, the clkm clock rate changes to 1 mhz after the next sleep cycle if the clkm_ctrl setting is not updated after reset. 9.6.5 register description register 0x03 (trx_ctrl_0): the trx_ctrl_0 register controls the drive current of the digital output pads and the clkm clock rate. it is recommended to use the lowest value for the drive current to reduce the current consumption and the emission of signal harmonics. ? bit [7:6] - pad_io refer to section 1.3 ?digital pins? on page 7 . ? bit [5:6] - pad_io_clkm these register bits set the output driver current of pin clkm. it is recommended to reduce the current capability to pad_io_clkm = 0 (2 ma) if possible. th is reduces power consumption and spurious emissions. ? bit 3 - clkm_sha_sel register bit clkm_sha_sel defines if a new clock rate, defined by clkm_ctrl, is set imme- diately or after the next sleep cycle. bit 76 5 4 3 2 1 0 +0x03 pad_io pad_io_clkm clkm_sha_sel clkm_ctrl trx_ctrl_0 read/write r/w r/w r/w r/w r/w r/w r/w r/w initial value 0 0 0 1 1 0 0 1 table 9-12. clkm driver strength register bit value description pad_io_clkm 0 2 ma 1 4 ma 26 ma 38 ma table 9-13. clkm clock rate update scheme register bit value description clkm_sha_sel 0 clkm clock rate change appears immediately 1 clkm clock rate change appears after sleep cycle
119 8111c?mcu wireless?09/09 at86rf231 ? bit [2:0] - clkm_ctrl these register bits set clock rate of pin 17 (clkm). register 0x12 (xosc_ctrl): the register xosc_ctrl c ontrols the operation of the crystal oscillator. ? bit [7:4] - xtal_mode these register bits set the operating mode of the crystal oscillator. for normal operation the default value is set to xtal_mode = 0xf after reset. using an external clock source it is recom- mended to set xtal_mode = 0x4. table 9-14. clock rate setting at pin clkm register bit value description clkm_ctrl 0 no clock at pin 17 (clkm), pin set to logic low 1 1 mhz 22 mhz 34 mhz 48 mhz 516 mhz 6250 khz 7 62.5 khz (ieee 802.15.4 symbol rate) bit 765 4 3 210 +0x12 xtal_mode xtal_trim xosc_ctrl read/write r/w r/w r/w r/w r/w r/w r/w r/w initial value 1 1 1 1 0 0 0 0 table 9-15. crystal oscillato r operating mode register bit value description xtal_mode 0x4 internal crystal oscillator disabled, use external reference frequency 0xf internal crystal oscillator enabled xosc voltage regulator enabled
120 8111c?mcu wireless?09/09 at86rf231 ? bit [3:0] - xtal_trim the register bits xtal_trim control two inter nal capacitance arrays connected to pins xtal1 and xtal2. a capacitance value in the range from 0 pf to 4.5 pf is selectable with a resolution of 0.3 pf. table 9-16. crystal oscillator trimming capacitors register bit value description xtal_trim 0x0 0.0 pf, trimming capa citors disconnected 0x1 0.3 pf trimming capacitor switched on ... 0xf 4.5 pf trimming capacitor switched on
121 8111c?mcu wireless?09/09 at86rf231 9.7 frequency synthesizer (pll) the main pll features are: ? generate rx/tx frequencies for all ieee 802.15.4 - 2.4 ghz channels ? autonomous calibration loops for stable operation within the operating range ? two pll-interrupts for status indication ? fast pll settling to support frequency hopping 9.7.1 overview the pll generates the rf frequencies for the at86rf231. during receive operation the fre- quency synthesizer works as a local oscillator on the radio transceiver receive frequency, during transmit operation the voltage-controlled oscillator (vco) is directly modulated to generate the rf transmit signal. the frequency synthesiz er is implemented as a fractional-n pll. two calibration loops ensure correct pll functi onality within the spec ified operating limits. 9.7.2 rf channel selection the pll is designed to support 16 channels in the 2.4 ghz ism band with a channel spacing of 5 mhz according to ieee 802.15.4. the cent er frequency of these channels is defined as follows: f c = 2405 + 5 (k - 11) in [mhz], for k = 11, 12,..., 26 where k is the channel number. the channel k is selected by register bits channel (register 0x08, phy_cc_ca). 9.7.3 frequency agility when the pll is enabled during state transition from trx_off to pll_on, the settling time is typically t tr4 = 110 s, including settling of the analog voltage regulator (avreg) and pll self calibration, refer to table 7-2 on page 43 and figure 13-13 on page 168 . a lock of the pll is indicated with an interrupt irq_0 (pll_lock). switching between 2.4 ghz ism band channels in pll_on or rx_on states is typically done within t tr20 = 11 s. this makes the radio transceiver highly suitable for frequency hopping applications. when starting the transmit procedure the p ll frequency is changed to the transmit frequency within a period of t tr23 = 16 s before starting the transmission. after the transmission the pll settles back to the receive frequency within a period of t tr24 = 32 s. this frequency step does not generate an interrupt irq_0 (pll_lock) or irq_1 (pll_unlock) within these periods. 9.7.4 calibration loops due to variation of temperature, supply voltage and part-to-part variations of the radio trans- ceiver the vco characteristics may vary. to ensure a stable operation, two automated control loops are implemented, center frequency (cf) tuning and delay cell (dcu) calibration. both calibration loops are initiated automatically when the pll is enabled during state transition from trx_off to pll_on state. additionally, center frequency calibration is initiated when the pll changes to a different channel center frequency.
122 8111c?mcu wireless?09/09 at86rf231 if the pll operates for a long time on the same channel, e.g. more than 5 min, or the operating temperature changes significantly, it is recommended to initiate the calibration loops manually. both calibration loops can be initiated manual ly by setting pll_cf_start = 1 (register 0x1a, pll_cf) and register bit pll_dcu_start = 1 (register 0x1b, pll_dcu). to start the calibra- tion the device must be in pll_on or rx_on state. the completion of the center frequency tuning is indicated by a pll_lock interrupt. both calibration loops may be run simultaneously. 9.7.5 interrupt handling two different interrupts indicate the pll status (refer to register 0x0f). irq_0 (pll_lock) indi- cates that the pll has locked. irq_1 (pll_unlock) interrupt indicates an unexpected unlock condition. a pll_lock interrupt clears any preceding pll_unlock interrupt automatically and vice versa. a pll_lock interrupt is supposed to occur in the following situations: ? state change from trx_off to pll_on / rx_on / tx_aret_on / rx_aack_on ? channel change in states pll_on / rx_on / tx_aret_on / rx_aack_on any other occurrences of pll interrupts indicate erroneous behavior and require checking of the actual device status. the state transition from busy_tx to pll_on after successful transmission does not generate an irq_0 (pll_lock) within the settling period. 9.7.6 register description register 0x08 (phy_cc_cca): this register sets the ieee 802.15.4 - 2. 4 ghz channel number ? bit 7 - cca_request refer to section 8.5 ?clear channel assessment (cca)? on page 94 . ? bit [6:5] - cca_mode refer to section 8.5 ?clear channel assessment (cca)? on page 94 . ? bit [4:0] - channel the register bits channel define the rx/tx channel. the channel assignment is according to ieee 802.15.4. bit 7 6 5 4 3 2 1 0 +0x08 cca_request cca_mode channel phy_cc_cca read/write w r/w r/w r/w r/w r/w r/w r/w reset value 0 0 1 0 1 0 1 1
123 8111c?mcu wireless?09/09 at86rf231 register 0x1a (pll_cf): this register controls the operation of the center frequency calibration loop. ? bit 7 - pll_cf_start pll_cf_start = 1 initiates the center frequency calibration. the calibration cycle has finished after t tr21 = 35 s (typ.). the register bit is cleared immediately after finishing the calibration. ? bit [6:0] - reserved register 0x1b (pll_dcu): this register controls the operation of the delay cell calibration loop. table 9-17. channel assignment for ieee 802.15.4 - 2.4 ghz band register bit value channel number k center frequency [mhz] channel 0x0b 11 2405 0x0c 12 2410 0x0d 13 2415 0x0e 14 2420 0x0f 15 2425 0x10 16 2430 0x11 17 2435 0x12 18 2440 0x13 19 2445 0x14 20 2450 0x15 21 2455 0x16 22 2460 0x17 23 2465 0x18 24 2470 0x19 25 2475 0x1a 26 2480 bit 7 6 5 4 3 2 1 0 +0x1a pll_cf_start reserved pll_cf read/write r/w r/w r/w r/w r/w r/w r/w r/w reset value 0 1 0 1 0 1 1 1 bit 7 6 5 4 3 2 1 0 +0x1b pll_dcu_start reserved pll_dcu read/write r/w r r/w r/w r/w r/w r/w r/w reset value 0 0 1 0 0 0 0 0
124 8111c?mcu wireless?09/09 at86rf231 ? bit 7 - pll_dcu_start pll_dcu_start = 1 initiates the delay cell calibra tion. the calibration cycle has finished after at most t tr22 = 6 s, the register bit is set to 0. the re gister bit is cleared immediately after finish- ing the calibration. ? bit [6:0] - reserved
125 8111c?mcu wireless?09/09 at86rf231 9.8 automatic filter tuning (ftn) 9.8.1 overview the ftn is incorporated to compensate device tolerances for temperature, supply voltage varia- tions as well as part-to-part variations of the ra dio transceiver. the filter-tuning result is used to correct the analog baseband filter transfer function and the pll loop-filter time constant, refer to section 4. ?general circuit description? on page 10 . an ftn calibration cycle is initiated automati cally when entering the trx_off state from the sleep, reset or p_on states. although receiver and transmitter are very robust against these variations, it is recommended to initiate the ftn manually if th e radio transceiver does not use the sleep state. if necessary, a calibration cycle is to be initia ted in states trx_off, pll_on or any receive state. this applies in particular for the high data rate modes with a much higher sensitivity against bpf transfer function variations. the recommended calibration interval is 5 min or less. 9.8.2 register description register 0x18 (ftn_ctrl): this register controls the operation of the filter tuning network calibration loop. ? bit 7 - ftn_start ftn_start = 1 initiates the filter tuning network calibration. wh en the calibration cycle has fin- ished after at most 25 s the register bit is automatically reset to 0. ? bit [6:0] - reserved bit 7 6 5 4 3 2 1 0 +0x18 ftn_start reserved ftn_ctrl read/write r/w r/w r/w r/w r/w r/w r/w r/w reset value 0 1 0 1 1 0 0 0
126 8111c?mcu wireless?09/09 at86rf231 10. radio transceiver usage this section describes basic procedures to receive and transmit frames using the at86rf231. for a detailed programming description refer to reference [6] . 10.1 frame receive procedure a frame reception comprises of two actions: the phy listens for, receives and demodulates the frame to the frame buffer and signalizes the reception to the microcontroller. after or while that the microcontroller read the available frame data from the frame buffer via the spi interface. while in state rx_on or rx_aack_on the radio transceiver searches for incoming frames on the selected channel. assuming the appropriate interrupts are enabled, a detection of an ieee 802.15.4 compliant frame is indicated by interrupt irq_2 (rx_start) first. the frame reception is complete d when issuing interrupt irq_3 (trx_end). different frame buffer read access scenarios are recommended for: waiting for irq_3 (trx_end) interrupt before starting a frame buffer read access is recom- mended for operations considered to be none time critical. figure 10-1 on page 126 illustrates the frame receive procedure using irq_3 (trx_end). figure 10-1. transactions between at86rf231 and microcontroller during receive critical protocol timing could require starting the frame buffer read access after interrupt irq_2 (rx_start). the first byte of the frame data can be read 32 s after the irq_2 (rx_start) interrupt. the microcontroller must ensure to read slower than the frame is received. otherwise a frame buffer under run occurs, irq_6 (trx_ur) is issued, and the frame data may be not valid. to avoid this, the frame buffer read access can be controlled by using a frame buffer empty indicator, refer to section 11.7 ?frame buffer empty indicator? on page 152 . ? non-time critical applications read access starts after irq_3 (trx_end) ? time-critical applications read access starts after irq_2 (rx_start) at86rf231 microcontroller irq issued (irq_2) read irq status, pin 24 (irq) deasserted irq issued (irq_3) read frame data (frame buffer access) read irq status, pin 24 (irq) deasserted
127 8111c?mcu wireless?09/09 at86rf231 10.2 frame transmit procedure a frame transmission comprises of two actions, a frame buffer write access and the transmis- sion of the frame buffer content. both actions can be run in parallel if required by critical protocol timing. figure 10-2 on page 127 illustrates the frame tr ansmit procedure, when writing and transmitting the frame consecutively. after a frame buffer write access, the frame transmission is initiated by asserting pin 11 (slp_tr) or writing command tx_start to register 0x02 (trx_state), while the radio transceiver is in state pll_on or tx_aret_on. the completion of the transac- tion is indicated by interrupt irq_3 (trx_end). figure 10-2. transaction between at86rf231 and microcontroller during transmit alternatively a frame transmission can be started first, followed by the frame buffer write access (psdu data); refer to figure 10-3 on page 127 . this is applicable for time critical applications. initiating a transmission, either by asserting pin 11 (slp_tr) or command tx_start to regis- ter bits trx_cmd (register 0x02, trx_state), the radio transceiver starts transmitting the shr, which is inte rnally generated. this first phase requires 16 s for pll settlin g and 160 s for shr transmission. the phr must be available in the frame buffer before this time elapses. furthermore the spi data rate must be higher than the phy data rate selected by register bits oqpsk_data_rate (register 0x0c, trx_ctrl_2) to ensure that no frame buffer under run occurs, indicated by irq_6 (trx_ur), refer to section 11.3 ?high data rate modes? on page 137 . figure 10-3. time optimized frame transmit procedure at86rf231 microcontroller write frame data (frame buffer access) write trx_cmd = tx_start, or assert pin 11 (slp_tr) irq_3 (trx_end) issued read irq_status register, pin 24 (irq) deasserted irq_3 (trx_end) issued write frame data (frame buffer access) write trx_cmd = tx_start, or assert pin 11 (slp_tr) at86rf231 microcontroller read irq_status register, pin 24 (irq) deasserted
128 8111c?mcu wireless?09/09 at86rf231 11. at86rf231 extended feature set 11.1 security module (aes) the security modu le (aes) is characterized by: ? hardware accelerated encryption and decryption ? compatible with aes-128 standard (128-bit key and data block size) ? ecb (encryption/decryption) mode and cbc (encryption) mode support ? stand-alone operation, independent of other blocks 11.1.1 overview the security module is based on an aes-128 co re according to fips197 standard, refer to [5] . the security module works independent of other building blocks of the at86rf231, encryption and decryption can be performed in parallel to a frame transmission or reception. controlling the security block is implemented as an sram access to address space 0x82 to 0x94. a fast sram access mode allows simultaneously writing new data and reading data from previously processed data within the same spi transfer. this access procedure is used to reduce the turnaround time for ecb mode, see section 11.1.5 ?data transfer - fast sram access? on page 132 . in addition, the security module contains another 128-bit register to store the initial key used for security operations. this initial key is not modified by the security module. 11.1.2 security module preparation the use of the security module requires a confi guration of the security engine before starting a security operation. the following steps are required: before starting any security operation a key must be written to the security engine, refer to sec- tion 11.1.3 ?security key setup? on page 129 . the key set up requires the configuration of the aes engine key mode using regi ster bits aes_mode (sra m address 0x83, aes_ctrl). the following step selects the aes mode, either el ectronic code book (e cb) or cipher block chaining (cbc). these modes are explained more in detail in sections section 11.1.4 ?security operation modes? on page 129 . further, encryption or decryption must be selected with register bit aes_dir (sram address 0x83, aes_ctrl). as next the 128-bit plain text or ciphertext data has to be provided to th e aes hardware engine. the data uses the sram address range 0x84 - 0x93. table 11-1. aes engine confi guration steps step description description section 1 key setup write encryption or decryption key to sram section 11.1.3 2 aes mode select aes mode: ecb or cbc select encryption or decryption section 11.1.4.1 section 11.1.4.2 3 write data write plaintext or cipher text to sram section 11.1.5 4 start operation start aes operation 5 read data read cipher text or plaintext from sram section 11.1.5
129 8111c?mcu wireless?09/09 at86rf231 the encryption or decryption is initiated wi th register bit aes_request = 1 (sram address 0x83, aes_ctrl or the mirror ed version with sram address 0x94, aes_ctrl_mirror). the aes module control re gisters are only access ible using sram read and write accesses on address space 0x 82 to 0x94. a configuration of the aes mode, providing the data and the start of the operation can be combined within one sram access. notes ? no additional register access is required to operate the security block. ? using aes in trx_off state requires an activated clock at pin 17 (clkm) , i.e. register bits clkm_ctrl!= 0. for further details refer to section 9.6.4 ?master clock signal output (clkm)? on page 117 . ? access to the security block is not possible while the radio transceiv er is in state sleep. ? all configurations of the security module, the sram content and keys are reset during sleep or reset states. 11.1.3 security key setup the setup of the key is prepared by setting register bits aes_mode = 0x1 (sram address 0x83, aes_ctrl). afterwards the 128 bit key must be written to sram addresses 0x84 through 0x93 (registers aes_key). it is recommended to co mbine the setting of control register 0x83 (aes_ctrl) and the 128 bit key transfer using only one sram access starting from address 0x83. the address space for the 128-bit key and 128-bi t data is identical from programming point of view. however, both use different pages which are selected by regist er bit aes_mode before storing the data. a read access to registers aes_key (0x84 - 0x93) returns the last round key of the preceding security operation. after an ecb encryption operation, this is the key that is required for the cor- responding ecb decryption operation. however, the initial aes key, written to the security module in advance of an aes run, see step 1 in table 11-1 on page 128 , is not modified during an aes operation. this initial key is used fo r the next aes run even it cannot be read from aes_key. note ? ecb decryption is not required for ieee 802.15.4 or zigbee security processing. the at86rf231 provides this functionality as an additional feature. 11.1.4 security operation modes 11.1.4.1 electronic code book (ecb) ecb is the basic operating mode of the security module. after setting up the initial aes key, reg- ister bits aes_mode = 0 (sram address 0x83 , aes_ctrl) sets up ecb mode. register bit aes_dir (sram address 0x83, aes_ctrl) selects the direction, either encryption or decryp- tion. the data to be processed has to be written to sram addresses 0x84 through 0x93 (registers aes_state). an example for a programmi ng sequence is shown in figure 11-1 on page 130 . this example assumes a suitable key has been loaded before.
130 8111c?mcu wireless?09/09 at86rf231 a security operation can be started within one sram access by appending the start command aes_request = 1 (register 0x94, aes_ctrl_m irror) to the spi sequence. register aes_ctrl_mirror is a mirrored versio n of register 0x83 (aes_ctrl). figure 11-1. ecb programming spi sequence - encryption summarizing, the following steps are required to perform a security operation using only one spi access: this sequence is recommended because the security operation is configured and started within one spi transaction. the ecb encryption operat ion is illustrated in figure 11-2 on page 130 . figure 11-3 on page 130 shows the ecb decryption mode, which is supported in a similar way. figure 11-2. ecb mode - encryption figure 11-3. ecb mode - decryption 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 data_0[7:0] byte 1 (address) byte 0 (cmd.) byte 2 (aes cmd) byte 3 (data) data_15[7:0] byte 18 (data) 1 0 0 0 0 0 0 0 byte 19 (aes cmd) aes start ecb, encryption 0x83 sram write 1. configure spi access a) sram write, refer to section 6.2.3 b) start address 0x83 2. configure aes operation address 0x83: select ecb mode, direction 3. write 128-bit data block addresses 0x84 - 0x93: either plain or ciphertext 4. start aes operation addresses 0x94: start aes operation, ecb mode block cipher encryption encryption key plaintext ciphertext block cipher encryption plaintext ciphertext encryption key block cipher decryption decryption key plaintext ciphertext block cipher decryption decryption key plaintext ciphertext
131 8111c?mcu wireless?09/09 at86rf231 when decrypting, due to the nature of aes algorithm, the initial key to be used is not the same as the one used for encryption, but rather the last round key instead. this last round key is the content of the key address space stored after running one full encryption cycle, and must be saved for decryption. if the decryption key has not been saved, it has to be recomputed by first running a dummy encryption (of an arbitrary plaintext) using the original encryption key, then fetching the resulting round key from the key memory, and writing it back into the key memory as the decryption key. ecb decryption is not used by ei ther ieee 802.15.4 or zigbee frame security. both of these standards do not directly encrypt the payload, but rather a nonce instead, and protect the pay- load by applying an xor operation between the resulting (aes-) cipher text and the original payload. as the nonce is the same for encry ption and decryption only ecb encryption is required. decryption is performed by xoring the received cipher text with its own encryption result respectively, which results in the original plaintext payload upon success. 11.1.4.2 cipher block chaining (cbc) in cbc mode, the result of a previous aes op eration is xored with th e new incoming vector, forming the new plaintext to encrypt, see figure 11-4 on page 131 . this mode is used for the computation of a cryptographic checksum (message integrity code, mic). figure 11-4. cbc mode - encryption after preparing the aes key, and defining the aes operation direction using sram register bit aes_dir, the data has to be pr ovided to the aes engine and the cbc operation ca n be started. the first cbc run has to be configured as ecb to process the initial data (plaintext xored with an initialization vector provided by the microcontroller). all succeeding aes runs are to be con- figured as cbc by setting register bits aes_mode = 0x2 (register 0x83, aes_ctrl). register bit aes_dir (register 0x83, aes_ctrl) must be set to aes_dir = 0 to enable aes encryption. the data to be processed has to be transferred to the sram starting with address 0x84 to 0x93 (register aes_state). setting register bit aes_request = 1 (register 0x94, aes_ctrl_mirror) as described in section 11.1.4 ?security operation modes? on page 129 starts the first encryption within one sram access. this causes the next 128 bits of plaintext data to be xored with the previous cipher text data, see figure 11-4 on page 131 . according to ieee 802.15.4 the input for the very first cbc operation has to be prepared by a xoring a plaintext with an initialization vector (iv). the value of the initialization vector is 0. however, for non-compliant usage any other initialization vector can be used. this operation has to be prepared by the microcontroller. block cipher encryption encryption key ciphertext block cipher encryption plaintext ciphertext plaintext initialization vector (iv) encryption key ecb mode cbc mode
132 8111c?mcu wireless?09/09 at86rf231 note that ieee 802.15.4-2006 standard mic algorithm requires cbc mode encryption only, as it implements a one-way hash function. 11.1.5 data transfer - fast sram access the ecb and cbc modules including the aes core are clocked with 16 mhz. one aes opera- tion takes 24 s to execute, refer to parameter 12.4.15 in section 12.4 ?digital interface timing characteristics? on page 157 . that means that the processing of the data is usually faster than the transfer of the data via the spi interface. to reduce the overall processing time the at86 rf231 provides a fast sram access for the address space 0x82 to 0x94. figure 11-5. packet structure - fa st sram access mode note: byte 19 is the mirrored version of register aes_ctrl on sram address 0x94, see register description aes_ctrl_mirror for details. in contrast to a standard sram access, refer to section 6.2.3 ?sram access mode? on page 22 , the fast sram access allows writing an d reading of data simultaneously during one spi access for consecutive aes operations (aes run) . for each byte p0 transferred to pin 22 (mosi) for example in "aes access #1" , see figure 11-5 on page 132 (lower part), the previous content of the respective aes register c0 is clocked out at pin 20 (miso) with an offset of one byte. in the example shown in figure 11-5 on page 132 the initial plaintext p0 - p15 is written to the sram within "aes access #0" . the last command on address 0x94 (aes_ctrl_mirror) starts the aes operation ( "aes run #0" ). in the next "aes access #1" new plaintext data p0 - p15 is written to the sram for the second aes run, in paralle l the ciphertext c0 - c15 from the first aes run is clocked out at pin miso. to read the ciphertext from the last "aes run #(n)" one dummy "aes access #(n+1)" is needed. note that the sram write access always overwrites the previous processing result. the fast sram access automatically applies to all write operations to sram addresses 0x82 to 0x94. sram write mosi phy_status miso byte 0 (cmd) address 0x83 xx xx byte 1 (addr.) byte 2 (cfg) p0[7:0] xx byte 3 byte 4 byte 18 (1) byte 19 (start) 0x83 0x85 0x84 0x93 0x94 address mosi miso aes access #0 address p0 p15 ... cmd add cfg start xx xx ... stat xx xx xx 0x83 0x94 ... aes access #1 p0 p15 ... cmd add cfg start xx c14 ... stat xx xx c15 0x83 0x94 ... aes access #n+1 xx xx ... cmd add cfg start xx c14 ... stat xx xx c15 0x83 0x94 ... p1 p14 xx xx p1 p14 c0 c13 xx xx c0 c13 ... ... c0[7:0] p1[7:0] c14[7:0] c15[7:0] p15[7:0] aes run #0 aes run #n ...
133 8111c?mcu wireless?09/09 at86rf231 11.1.6 start of security operation and status a security operation is started within one sram access by appending the start command aes_request = 1 (register 0x94, aes_ctrl_m irror) to the spi sequence. register aes_ctrl_mirror is a mirrored versio n of register 0x83 (aes_ctrl). the status of the security processing is indicated by register 0x82 (aes_status). after 24 s aes processing time r egister bit aes_done changes to 1 (register 0x82, aes_status) indi- cating that the security operation has finished, see parameter 12.4.15 in section 12.4 ?digital interface timing characteristics? on page 157 . 11.1.7 sram register summary the following registers are required to control the security module: these registers are only accessible using sram write and read accesses, for details refer to section 6.2.3 ?sram access mode? on page 22 . note, that the sram register are reset when entering the sleep state. 11.1.8 aes sram configuration register register 0x82 (aes_status): this read-only register signals the status of the security module and operation. ?bit 7 - aes_er this sram register bit indicates an error of the aes module. an error may occur for instance after an access to sram regi ster 0x83 (aes_ctrl) while an aes operation is running or after reading less than 128 bits from sram register space 0x84 - 0x 93 (aes_state). table 11-2. sram security module address space overview sram-addr. register name description 0x80 - 0x81 reserved, not available 0x82 aes_status aes status 0x83 aes_ ctrl security module control, aes mode 0x84 - 0x93 aes_key aes_state depends on aes_ mode setting: aes_mode = 1: - contains aes_key (key) aes_mode = 0 | 2: - contains aes_state (128-bit data block) 0x94 aes_ ctrl _mirror mirror of register 0x83 (aes_ ctrl ) 0x95 - 0xff reserved, not available b i t 7 6543210 +0x82 aes_er reserved aes_done aes_status r e a d / w r i t er rrrrrrr r e s e t v a l u e0 0000000
134 8111c?mcu wireless?09/09 at86rf231 ? bit [6:1] -reserved ? bit 0 - aes_done register 0x83 (aes_ctrl): this register controls the operation of the security module. do not access this register during aes operation to read the aes core status. a read or write ac cess during aes operation stops the actual processing. to read the aes status use register bit aes_done (register 0x82, aes_status). ? bit 7 - aes_request a write access with aes_request = 1 initiates the aes operation. ? bit [6:4] - aes_mode this register bit sets the aes operation mode. table 11-3. aes core operation status register bit value description aes_er 0 no error of the aes module 1 aes module error table 11-4. aes core operation status register bit value description aes_done 0 aes module is not finished 1 aes module has finished bit 7 6 5 4 3 2 1 0 +0x83 aes_request aes_mode aes_dir reserved aes_ctrl read/write w r/w r/w r/w r/w r r r reset value 0 0 0 0 0 0 0 0 table 11-5. aes core status register bit value description aes_request 0 security module, aes core idle 1 write access: start security module table 11-6. aes mode register bit value description aes_mode 0 ecb mode, refer to section 11.1.4.1 1 key mode, refer to section 11.1.3 2 cbc mode, refer to section 11.1.4.2 3 - 7 reserved
135 8111c?mcu wireless?09/09 at86rf231 ? bits 3 - aes_dir this register bit sets the aes operation direction, either encryption or decryption. ? bit [2:0] - reserved register 0x94 (aes_ctrl_mirror): register 0x94 is a mirrored version of register 0x83 (aes_ctrl), for details refer to register 0x83 (aes_ctrl). this register could be used to start a security operation within a single sram access by append- ing it to the data stream and setting register bit aes_request = 1. table 11-7. aes direction register bit value description aes_dir 0 aes encryption (ecb, cbc) 1 aes decryption bit 7 6 5 4 3 2 1 0 +0x83 aes_request aes_mode aes_dir reserved aes_ctrl read/write w r/w r/w r/w r/w r r r reset value 0 0 0 0 0 0 0 0
136 8111c?mcu wireless?09/09 at86rf231 11.2 random numb er generator 11.2.1 overview the at86rf231 incorporates a 2-bit truly random number generator by observation of noise. this random number can be used to: the random number is updated every t tr29 = 1 s in basic operation mode receive states. the values are stored in register bits rnd_value (register 0x06, phy_rssi). 11.2.2 register description register 0x06 (phy_rssi): register 0x06 (phy_rssi) is a multi purpose regist er to indicate fcs validity, to provide ran- dom numbers and an rssi value. ? bit 7 - rx_crc_valid refer to register description in section 8.2.5 ?register description? on page 87 . ? bit [6:5] - rnd_value the 2-bit random value can be retrieved by readi ng register bits rnd_value. note that the radio transceiver shall be in basic operating mode receive state. the values are updated each t tr29 =1s. ? bit [4:0] - rssi refer to register description in section 8.3.4 ?register description? on page 90 . note: ensure that register bit rx_pdt_dis (register 0x15, rx_syn) is set to 0 at least 1 s before reading a random value. ? generate random seeds for csma-ca algorithm see section 7.2 ? generate random values for aes key generation see section 11.1 b i t 7 6 5 43210 +0x06 rx_crc_valid rnd_value rssi phy_rssi r e a d / w r i t e r r r rrrrr reset value 0 0 0 0 0 0 0 0
137 8111c?mcu wireless?09/09 at86rf231 11.3 high data rate modes the main features are: ? high data rate transmission up to 2 mb/s. ? support of basic and extended operating mode ? support of other features of the extended feature set ? reduced ack timing (optional) 11.3.1 overview the at86rf231 also supports alternative data rates, higher than 250 kb/s for applications beyond ieee 802.15.4 compliant networks. the selection of a data rate does not affect the remaining functionality. thus it is possible to run all features and operating modes of the radio transceiver in various combinations. the data rate can be selected by writing to register bits oqpsk_data_rate (register 0x0c, trx_ctrl_2). the high data rate modes occupy the same rf channel bandwidth as the ieee 802.15.4- 2.4 ghz 250 kb/s standard mode. due to the decreased spreading factor, the sensitivity of the receiver is reduced accordingly. table 11-8 on page 137 shows typical values of the sensitivity for different data rates. by default there is no header based signaling of the data rate within a transmitted frame. thus nodes using a data rate other than the default i eee 802.15.4 data rate of 250 kb/s are to be con- figured in advance and consistently. alternatively the configurable start of frame delimiter (sfd) could be used as an indicator of the phy data rate, see section 11.9 ?configurable start-of- frame delimiter? on page 155 . 11.3.2 high data rate packet structure in order to allow appropriate frame synchronizati on, higher data rate modulation is restricted to the payload octets on ly. the shr and the phr field are transmitted with the ieee 802.15.4 compliant data rate of 250 kb/s, refer to section 8.1.1 ?phy protocol layer data unit (ppdu)? on page 79 . a comparison of the general packet structure for different data rates with an example psdu length of 80 octets is shown in figure 11-6 on page 138 . table 11-8. high data rate sensitivity high data rate sensitivity comment 250 kb/s -101 dbm per 1%, psdu length of 20 octets 500 kb/s -97 dbm per 1%, psdu length of 20 octets 1000 kb/s -95 dbm per 1%, psdu length of 20 octets 2000 kb/s -89 dbm per 1%, psdu length of 20 octets
138 8111c?mcu wireless?09/09 at86rf231 figure 11-6. high data rate frame structure due to the overhead caused by the shr, phr as well as the fcs, the effective data rate is lower than the selected data rate. this is also affected by the length of the psdu. a graphical representation of the effective psdu data rate is shown in figure 11-7 on page 138 . figure 11-7. effective data rate "b" for high data rate mode the effective throughput is further affected by the mac overhead, the acknowledgment scheme as well as the mcu processing capability. consequently, high data rate transmission and reception is useful for large psdu lengths due to the higher effective data rate, or to reduce the power consumption of the system. when using high data rate modes the active on-air time is significantly reduced. 11.3.3 high data rate frame buffer access the frame buffer access to read or write fram es for high data rate tr ansmission is similar to the procedure described in section 6.2.2 ?frame buffer access mode? on page 20 . however, 250 kb/s 0 time [s] 192 sfd phr 832 1472 2752 500 kb/s sfd phr 1000 kb/s sfd phr 2000 kb/s sfd phr 512 fcs fcs psdu: 80 octets psdu: 80 octets psdu: 80 octets psdu: 80 octets 0 200 400 600 800 1000 1200 1400 1600 0 20 40 60 80 100 120 psdu length in octets b [kb/s ] 2000 1000 500 250 2000 kb/s 1000 kb/s 500 kb/s 250 kb/s
139 8111c?mcu wireless?09/09 at86rf231 during frame buffer read access the last byte transferred after the psdu data is the ed value rather than the lqi value. figure 11-8 on page 139 illustrates the packet st ructure of a high data rate frame buffer read access. figure 11-8. packet structure - high data rate frame buffer read access 11.3.4 high data rate energy detection according to ieee 802.15.4 the ed measurement duration is 8 symbol periods. for frames operated at higher data rates the automated ed measurement duration is reduced to 32 s to take the reduced frame length into account, refer to section 8.4 ?energy detection (ed)? on page 91 . during frame buffer read access the ed value is appended to the psdu data, refer to section 11.3.3 ?high data rate frame buffer access? on page 138 . 11.3.5 high data rate mode options receiver sensitivity control the different data rates between ppdu header (shr and phr) and phy payload (psdu) cause a different sensitivity between header and pa yload. this can be adjusted by defining sen- sitivity threshold levels of the receiver. with a sensitivity threshold level set (register bits rx_pdt_level > 0), the receiver does not receive frames wit h an rssi level below that threshold. under these operating conditions the receiver current consumption is reduced by about 500 a, refer to section 12.8 ?current consumption specifications? on page 161 parame- ter 12.8.4. enabling receiver sensit ivity control with at least rx_pdt_l evel = 1 is recommended for the 2 mb/s rate with a psdu sensitivity of -89 dbm. in the case of receiving with the default setting of rx_pdt_level, a high data rate frame may be detected even if the psdu sensitivity is above the received signal strength. in this case the frame is rejected. a description of the settings to control the sensitivity threshold with register 0x15 (rx_syn) can be found in section 9.1.4 ?register description? on page 103 . reduced acknowledgment timing on higher data rates the ieee 802.15.4 compliant acknowledgment frame response time of 192 s significantly reduces the ef fective data rate of the network. to minimize this influence in extended operating mode rx_aack, refer to section 7.2.3 ?rx_aack_on - receive with automatic ack? on page 51 , the acknowledgment frame response time can be reduced to 32 s. figure 11-9 on page 140 illustrates an example for a re ception and acknowledgement of a frame with a data rate of 2000 kb/s and a psdu length of 80 symbols. the psdu length of the acknowledgment frame is 5 octets according to ieee 802.15.4. 0 reserved[5:0] 0 mosi phy_status miso byte 1 (command byte) 1 xx phr[7:0] byte 2 (data byte) xx psdu[7:0] byte 3 (data byte) xx psdu[7:0] byte n-1 (data byte) xx ed[7:0] byte n (data byte)
140 8111c?mcu wireless?09/09 at86rf231 figure 11-9. high data rate aack timing if register bit aack_ack_time (register 0x17, xah_ctrl_1) is set the acknowledgment time is reduced from 192 s to 32 s. 11.3.6 register description register 0x0c (trx_ctrl_2): the trx_ctrl_2 register controls the data rate setting ? bit 7 - rx_safe_mode refer to section 11.8.2 ?register description? on page 154 . ? bit [6:2] - reserved ? bit [1:0] - oqpsk_data_rate a write access to these register bits sets the oqpsk psdu data rate us ed by the radio trans- ceiver. the reset value oqpsk_data_rate = 0 is the psdu data rate according to ieee 802.15.4. 0 time [s] 192 512 aack_ack_time = 0 psdu: 80 octets sfd phr sfd phr 704 916 32 s psdu: 80 octets sfd phr sfd phr 192 s 544 aack_ack_time = 1 ack ack bit 7 6 5 4 3 2 1 0 +0x0c rx_safe_mode reserved oqpsk_data_rate trx_ctrl_2 read/write r/w r r r r r r/w r/w reset value 0 0 0 0 0 0 0 0 table 11-9. oqpsk data rate register bits value oqpsk data rate comment oqpsk_data_rate 0 250 kb/s ieee 802.15.4 compliant 1500 kb/s 2 1000 kb/s 3 2000 kb/s
141 8111c?mcu wireless?09/09 at86rf231 register 0x17 (xah_ctrl_1): the xah_ctrl_1 register is a multi-purpose control register for various rx_aack settings. ? bit [7:6] - reserved ? bit 5 - aack_fltr_res_ft refer to 7.2.7 ?register description - control registers? on page 68 . ? bit 4 - aack_upld_res_ft refer to section 7.2.7 ?register description - control registers? on page 68 . ? bit 3 - reserved ? bit 2 - aack_ack_time according to ieee 802.15.4, section 7.5.6.4.2 the transmission of an acknowledgment frame shall commence 12 symbol periods (aturnaroundtime) after the reception of the last symbol of a data or mac command frame. this is fulfilled with the reset value of the register bit [2] (aack_ack_time). if aack_ack_time = 1 an acknowledgment frame is sent 32 s after the reception of the last symbol of a data or mac command frame. this may be applied to proprietary networks including networks using the high data rate modes to improve the overall data throughput. ? bit 1 - aack_prom_mode refer to section 7.2.7 ?register description - control registers? on page 68 . ? bit 0 - reserved bit 7 6 5 4 3 2 1 0 +0x17 reserved aack_fltr_res_ft aack_upld_res_ft reserved aack_ack_time aack_prom_mode reserved xah_ctrl_1 read/write r/w r r/w r/w r r/w r/w r reset value 0 0 1 0 0 0 0 0
142 8111c?mcu wireless?09/09 at86rf231 11.4 antenna diversity the antenna diversity implementation is characterized by: ? improves signal path robustness between nodes ? at86rf231 self-contained antenna diversity algorithm ? direct register based antenna selection 11.4.1 overview due to multipath propagation effects between network nodes, the receive signal strength may vary and affect the link quality, even for small changes of the antenna location. these fading effects can result in an increased error floor or loss of the connection between devices. to improve the reliability of an rf connection betw een network nodes ante nna diversity can be applied to reduce effects of multipath propagation and fading. antenna diversity uses two anten- nas to select the most reliable rf signal path. this is done by the radio transceiver during preamble field search without the need for microcontroller interaction. to ensure highly indepen- dent receive signals on both antennas, the antennas should be carefully separated from each other. if a preamble field is detected on one antenna, this antenna is selected for reception. otherwise the search is continued on the other antenna and vice versa. antenna diversity can be used in basic and extended operating modes and can also be com- bined with other features and operating modes like high data rate mode and rx/tx indication. 11.4.2 antenna diversity application example a block diagram for an application us ing an antenna switch is shown in figure 11-10 on page 142 . figure 11-10. antenna diversity - block diagram 6 5 4 3 2 1 910 at86rf231 dig3 dig4 avss rfp rfn avss dig1 dig2 balun ant0 ant1 rf- switch b1 sw1 ...
143 8111c?mcu wireless?09/09 at86rf231 generally, the antenna diversity algorithm is enabled with register bit ant_div_en (register 0x0d, ant_div) set. in this case the control of an antenna diversity switch must be enabled by register bit ant_ext_sw_en (register 0x0d, ant_div). the internal connection to digital ground of the control pins pin 9 (dig1) and pin 10 (dig2) is disabled (refer to section 4.2), and they feed the antenna switch signal and its inverse to the differential inputs of the rf switch (sw1). upon reception of a frame the at86rf231 selects one antenna during preamble field detection. the selected antenna is then indicated by regi ster bit ant_sel (register 0x0d, ant_div). after the frame reception is completed, the antenna selection continues searching for new frames on both antennas. however, the register bit ant_sel maintains its previous value (from the last received frame) until a new shr has been found, and the selection algorithm locked into one antenna again. at this time the register bit ant_sel is updated again. for transmission the antenna defined by register bits ant_ctrl (register 0x0d, ant_div) is selected. if for example the same antenna is to be used for transmission as being selected for reception, the antenna must be set using register bits ant_ctrl, based on the value read from register bit ant_sel. it is recommended to read register bit ant_sel after irq_2 (rx_start). the autonomous search and selection allows the use of antenna diversity during reception even if the microcontroller does currently not control the radio transceiver, for instance in extended operating mode. a microcontroller defined selection of a certain antenna can be done by disabling the automated antenna diversity algorithm (ant_div_en = 0) and selecting one antenna using register bit ant_ctrl. if the at86rf231 is not in a receive or transmit state, it is recommended to disable register bit ant_ext_sw_en to reduce the power consumption or avoid leakage current of an external rf switch, especially during sleep state. if register bit ant_ext_sw_en = 0, output pins dig1/dig2 are pulled-down to digital ground. 11.4.3 antenna diversity sensitivity control due to a different receive algorithm used by the antenna diversity algorithm, the correlator threshold of the receiver has to be adjusted. it is recommended to set register bits pdt_thres (register 0x0a, rx_ctrl) to 3. 11.4.4 register description register 0x0a (rx_ctrl): the rx_ctrl controls the sensitivity of the antenna diversity mode ? bit [7:4] - reserved bit 7 6 5 4 3 2 1 0 +0x0a reserved pdt_thres rx_ctrl read/write r/w r/w r/w r/w r/w r/w r/w r/w reset value 1 0 1 1 0 1 1 1
144 8111c?mcu wireless?09/09 at86rf231 ? bit [3:0] - pdt_thres these register bits control the sensitivity of the receiver correlation unit. if the antenna diversity algorithm is enabled (ant_div_en = 1), the value shall be set to pdt_thres = 3, otherwise it shall be set back to the reset value. this is not automatically done by the hardware. register 0x0d (ant_div): the ant_div register controls antenna diversity. ? bit 7 - ant_sel this register bit signals the currently selected antenna path. the selection may be based either on the last antenna diversity cycle (ant_div_en = 1) or on the content of register bits ant_ctrl, for details refer to section 11.4.2 ?antenna diversity application example? on page 142 . ? bit [6:4] - reserved ? bit 3 - ant_div_en if register bit ant_div_en is set, the antenna div ersity algorithm is enabled. on reception of a frame the algorithm selects an antenna autonomously during shr search. this selection is kept until: ? a new shr search starts ? leaving receive states ? manually programmed register bits ant_ctrl table 11-10. receiver sensitivity control register bit value description pdt_thres 0x7 reset value, to be used if antenna diversity algorithm is disabled 0x3 recommended correlator threshold for antenna diversity operation other reserved bit 7 6 5 4 3 2 1 0 +0x0d ant_sel reserved ant_div_en ant_ext_sw_en ant_ctrl ant_div read/write r r r r r/w r/w r/w r/w reset value 0 0 0 0 0 0 1 1 table 11-11. antenna diversity - antenna status register bit value description ant_sel 0 antenna 0 1 antenna 1
145 8111c?mcu wireless?09/09 at86rf231 note: if ant_div_en = 1 register bi t ant_ext_sw_en shall be set to 1, too. this is not automatically done by the hardware. ? bit 2 - ant_ext_sw_en if enabled, pin 9 (dig1) and pin 10 (dig2) become output pins and provide a differential control signal for an antenna diversity switch. the selection of a specific antenna is done either by the automated antenna diversity algorithm (ant_div_en = 1), or according to register bits ant_ctrl if antenna divers ity algorithm is disabled. do not enable antenna diversity rf switch c ontrol (ant_ext_sw_en = 1) and rx frame time stamping (irq_2_ext_en = 1) at the same time, see section 11.6 ?rx frame time stamping? on page 150 . if the register bit is set the control pins dig1/dig2 are activated in all radio transceiver states as long as register bit ant_ext_sw_en is set. if the at86rf231 is not in a receive or transmit state, it is recommended to disable register bit ant_ext_sw_en to reduce the power con- sumption or avoid leakage current of an external rf switch, especially during sleep state. if register bit ant_ext_sw_en = 0, output pins dig1 and dig2 are pulled-down to digital ground. note: if ant_ext_sw_en = 0, register bit ant_div_en shall be set to 0 and register bits ant_ctrl to 3. this is not automatically done by the hardware. ? bit [1:0] - ant_ctrl these register bits provide a static cont rol of an antenna diversity switch. setting ant_div_en = 0 (antenna diversity disabled), th is register setting defines the selected antenna. although it is possible to change regi ster bits ant_ctrl in state trx_off, this change will be effective at pins dig1 and dig2 in state pll_on as well as all receive and trans- mit states. table 11-12. antenna diversity control register bit value description ant_div_en 0 antenna diversity algorithm disabled 1 antenna diversity algorithm enabled table 11-13. antenna diversity rf switch enable register bit value description ant_ext_sw_en 0 antenna diversity rf switch control disabled 1 antenna diversity rf switch control enabled table 11-14. antenna diversity switch control register bit value description
146 8111c?mcu wireless?09/09 at86rf231 note: register values 1 and 2 are valid for ant_ext_sw_en = 1. ant_ctrl 0 reserved 1 antenna 1 dig1 = l dig2 = h 2 antenna 0 dig1 = h dig2 = l 3 default value for ant_ext_sw_en = 0. mandatory setting for applications not using antenna diversity. table 11-14. antenna diversity switch control
147 8111c?mcu wireless?09/09 at86rf231 11.5 rx/tx indicator the main features are: ? rx/tx indicator to control an external rf front-end ? microcontroller independent rf front-end control ? provide tx timing information 11.5.1 overview while ieee 802.15.4 is a low cost , low power standard, solutions s upporting higher transmit out- put power are occasionally desirable. to simplify the control of an optional external rf front- end, a differential control pin pair can indicate that the at86rf231 is currently in transmit mode. the control of an external rf front-end is done via digital control pins dig3/dig4. the function of this pin pair is enabled with register bit pa_ ext_en (register 0x04, trx_ctrl_1). while the transmitter is turned off pin 1 (dig3) is set to low level and pin 2 (dig4) to high level. if the radio transceiver starts to transmit, the two pins change the polarity. this differential pin pair can be used to control pa, lna, and rf switches. if the at86rf231 is not in a receive or transmit state, it is recommended to disable register bit pa_ext_en (register 0x04, trx_ctrl_1) to reduce the power consumption or avoid leakage current of external rf switches and other building blocks, es pecially during sl eep state. if reg- ister bits pa_ext_en = 0, output pins dig3/dig4 are pulled-down to analog ground. 11.5.2 external rf-front end control using an external rf front-end including a power amplifier (pa) it may be required to adjust the setup time of the external pa relative to the internal building blocks to optimize the overall power spectral density (psd) mask. figure 11-11. tx power ramping control for rf front-ends the start-up sequence of the individual building blocks of the internal transmitter is shown in fig- ure 11-11 on page 147 , where transmission is actually initiated by the rising edge of pin 11 (slp_tr). the radio transceiver state changes from pll_on to busy_tx and the pll settles 0 6810 trx_state slp_tr pll_on 2 12 14 16 18 length [s] pa buffer 4 pa pa_buf_lt pa_lt dig3 dig4 modulation 11 11 11 00 0 busy_tx
148 8111c?mcu wireless?09/09 at86rf231 to the transmit frequency within 16 s. the modulation starts 16 s after the rising edge of slp_tr. during this time, the pa buffer and the internal pa are enabled. the control of an external pa is done via differential pin pair dig3/dig4. dig3 = h / dig4 = l indicates that the transmission starts and can be used to enable an external pa. the timing of pins dig3/dig4 can be adjusted relative to the start of the frame and the activation of the inter- nal pa buffer. this is controlled using register bits pa_buf_lt and pa_lt. for details refer to section 9.2.4 ?tx power ramping? on page 104 . 11.5.3 register description register 0x04 (trx_ctrl_1): the trx_ctrl_1 register is a multi purpose regi ster to control various operating modes and settings of the radio transceiver. ? bit 7 - pa_ext_en this register bit enables pin 1 (dig3) and pin 2 (dig4) to indicate the transmit state of the radio transceiver. note: 1. it is recommended to set pa_ext_en = 1 onl y in receive or transmit states to reduce the power consumption or avoid leakage current of external rf switches or other building blocks, especially during sleep state. ? bit 6 - irq_2_ext_en refer to section 11.6 ?rx frame time stamping? on page 150 . ? bit 5 - tx_auto_crc_on refer to section 8.2 ?frame check sequence (fcs)? on page 85 . ? bit 4 - rx_bl_ctrl refer to section 11.7 ?frame buffer empty indicator? on page 152 . ? bit [3:2] - spi_cmd_mode refer to section 6.3 ?radio transceiver status information? on page 24 . bit 7 6 5 4 3 2 1 0 +0x04 pa_ext_en irq_2_ext_en tx_auto_crc_on rx_bl_ctrl spi_cmd_mode irq_mask_mode irq_polarity trx_ctrl_1 read/write r/w r/w r/w r/w r/w r/w r/w reset value 0 0 1 0 0 0 0 table 11-15. rf front-end control pins pa_ext_en state pin value description 0 n/a dig3 l external rf front-end control disabled dig4 l 1 (1) tx_busy dig3 h external rf front-end control enabled dig4 l other dig3 l dig4 h
149 8111c?mcu wireless?09/09 at86rf231 ? bit 1 - irq_mask_mode refer to section 6.6 ?interrupt logic? on page 29 . ? bit 0 - irq_polarity refer to section 6.6 ?interrupt logic? on page 29 .
150 8111c?mcu wireless?09/09 at86rf231 11.6 rx frame time stamping 11.6.1 overview to determine the exact timing of an incoming frame, e.g. for beaconing networks, the reception of this frame can be signaled to the microcontroller via pin 10 (dig2). the pin turns from l to h after a detection of a valid phr. when enabled, dig2 is set to dig2 = h at the same time as irq_2 (rx_start), even if irq_2 is disabled. the pin remains high for the length of the frame receive procedure, see figure 11-3 on page 130 . figure 11-12. timing of rx_start and dig2 for rx frame time stamping note: timing figures refer to 12.4 ?digital interface timing characteristics? on page 157 . this function is enabled with register bit ir q_2_ext_en (register 0x04) set. pin 10 (dig2) could be connected to a timer capture unit of the microcontroller. if this pin is not used for rx frame time st amping it can be configured for antenna diversity. otherwise this pin is pulle d-down to digital ground. 128 160 192 0 192 + m * 32 time [s] rx frame on air irq_2 (rx_start) t irq rx_on rx_on irq trx_state interrupt latency preamble sfd phr psdu (250 kb/s) 41 1 m < 128 number of octets frame content trx_end t irq busy_rx dig2 (rx frame time stamp)
151 8111c?mcu wireless?09/09 at86rf231 11.6.2 register description register 0x04 (trx_ctrl_1): register 0x04 (trx_ctrl_1) is a multi purpose register to control various operating modes and settings of the radio transceiver. ? bit 7 - pa_ext_en refer to section 11.5 ?rx/tx indicator? on page 147 . ? bit 6 - irq_2_ext_en if this register bit is set the rx frame time stamping mode is enabled. an incoming frame with a valid phr is signaled via pin 10 (dig2). the pin remains at high level until the end of the frame receive procedure, see figure 11-12 on page 150 . do not enable rx frame time stamping (irq_2_ext_en = 1) and antenna diversity (ant_ext_sw_en = 1) at the same time, see section 11.4 ?antenna diversity? on page 142 . ? bit 5 - tx_auto_crc_on refer to section 8.2 ?frame check sequence (fcs)? on page 85 . ? bit 4 - rx_bl_ctrl refer to section 11.7 ?frame buffer empty indicator? on page 152 . ? bit [3:2] - spi_cmd_mode refer to section 6.3 ?radio transceiver status information? on page 24 . ? bit 1 - irq_mask_mode refer to section 6.6 ?interrupt logic? on page 29 . ? bit 0 - irq_polarity refer to section 6.6 ?interrupt logic? on page 29 . bit 7 6 5 4 3 2 1 0 +0x04 pa_ext_en irq_2_ext_en tx_auto_crc_on rx_bl_ctrl spi_cmd_mode irq_mask_mode irq_polarity trx_ctrl_1 read/write r/w r/w r/w r/w r/w r/w r/w reset value 0 0 1 0 0 0 0
152 8111c?mcu wireless?09/09 at86rf231 11.7 frame buffer empty indicator 11.7.1 overview for time critical applications that want to start reading the frame data as early as possible, the frame buffer status can be indicated to the mi crocontroller through a dedicated pin. this pin indicates to the microcontroller if an access to the frame buffer is not possible since valid psdu data are missing. pin 24 (irq) can be configured as a frame buffer empty indicator during a frame buffer read access. this mode is enabled by register bit rx_bl_ctrl (register 0x04, trx_ctrl_1). the irq pin turns into frame buffer empty indicator after the frame buffer read access command, see note (1) in figure 11-13 on page 152 , has been transferred on the spi bus until the frame buffer read procedure has finished indicated by /sel = h, see note (4) . figure 11-13. timing diagram of frame buffer empty indicator the microcontroller has to observe the irq pin during the frame buffer read procedure. a frame buffer read access can proceed as long as pin irq = l, see note (2) . pin irq = h indi- cates that the frame buffer is currently not ready for another spi cycle, note (3), and thus the frame buffer read procedure has to wait for valid data accordingly. the access indicator pin 24 (irq) shows a va lid access signal (either access is allowed or denied) not before t 13 = 750 nsec after the rising edge of last sclk clock of the frame buffer read command byte. after finishing the spi frame receive procedure, and the spi has been released by /sel = h, note (4) , pending interrupts are indicated immediately by pin irq. during all other spi accesses, except during a spi frame receive procedure with rx_bl_ctrl = 1, pin irq only indicates interrupts. if a receive error occurs during the frame buffer read access the frame buffer empty indicator locks on 'empty' (pin irq = h) too. to prevent possible deadlocks, the microcontroller should impose a timeout counter that checks whether the frame buffer empty indicator remains logic high for more than 64 s. presuming a phy data rate of 250 kb/s a new byte must have been arrived at the frame buffer during that period. if not, the frame buffer read access should be aborted. /sel mosi miso irq sclk command phy_status xx irq_status command phy_status xx phr[7:0] xx psdu[7:0] irq_2 (rx_start) xx psdu[7:0] xx psdu[7:0] t 13 xx lqi[7:0] command phy_status xx irq_status irq_3 (trx_end) frame buffer empty indicator (1) (4) (3) (2) notes
153 8111c?mcu wireless?09/09 at86rf231 11.7.2 register description register 0x04 (trx_ctrl_1): the trx_ctrl_1 register is a multi purpose regi ster to control various operating modes and settings of the radio transceiver. ? bit 7 - pa_ext_en refer to section 11.5 ?rx/tx indicator? on page 147 . ? bit 6 - irq_2_ext_en refer to section 11.6 ?rx frame time stamping? on page 150 . ? bit 5 - tx_auto_crc_on refer to section 8.2 ?frame check sequence (fcs)? on page 85 . ? bit 4 - rx_bl_ctrl if this register bit is set the frame buffer empty indicator is enabled. after sending a frame buf- fer read command, refer to section 6.2 ?spi protocol? on page 19 , pin 24 (irq) indicates to the microcontroller that an access to the frame buffer is not possible since valid psdu data are missing. pin irq does not indicate any interrupts during this time. ? bit [3:2] - spi_cmd_mode refer to section 6.3 ?radio transceiver status information? on page 24 . ? bit 1 - irq_mask_mode refer to section 6.6 ?interrupt logic? on page 29 . ? bit 0 - irq_polarity refer to section 6.6 ?interrupt logic? on page 29 . bit 7 6 5 4 3 2 1 0 +0x04 pa_ext_en irq_2_ext_en tx_auto_crc_on rx_bl_ctrl spi_cmd_mode irq_mask_mode irq_polarity trx_ctrl_1 read/write r/w r/w r/w r/w r/w r/w r/w reset value 0 0 1 0 0 0 0 table 11-16. frame buffer empty indicator register bit value description rx_bl_ctrl 0 frame buffer empty indicator disabled 1 frame buffer empty indicator enabled
154 8111c?mcu wireless?09/09 at86rf231 11.8 dynamic frame buffer protection 11.8.1 overview the at86rf231 continues the reception of incoming frames as long as it is in any receive state. when a frame was successfully received and stored into the frame buffer, the following frame will overwrite the frame buffer content again. to relax the timing requirements for a frame buffer read access the dynamic frame buffer pro- tection prevents that a new valid frame passes to the frame buffer until a frame buffer read access has ended (indicated by /sel = h, refer to section 6.2 ?spi protocol? on page 19 ). a received frame is automatically protected against overwriting: ? in basic operating mode, if its fcs is valid ? in extended operating mode, if an irq_3 (trx_end) is generated the dynamic frame buffer protection is enabled, if register bit rx_safe_mode (register 0x0c, trx_ctrl_2) is set and the transc eiver state is rx_on or rx_aack_on. note that dynamic frame buffer protection only pr events write accesses from the air interface - not from the spi interface. a frame buffer or sram write access may still modify the frame buffer content. 11.8.2 register description register 0x0c (trx_ctrl_2): the trx_ctrl_2 register is a multi purpose register to control various settings of the radio transceiver. ? bit 7 - rx_safe_mode if this bit is set dynamic frame buffer protection is enabled: note: 1. dynamic frame buffer protection is releas ed with the rising edge of pin23 (/sel) of a frame buffer read access, see section 6.2.2 ?frame buffer access mode? on page 20 , or radio trans- ceiver state changing from rx_on or rx_aack_on to another state. this operation mode is independent of the setting of register bits rx_pdt_level, refer to sec- tion 9.1.3 ?configuration? on page 102 . ? bit [6:2] - reserved ? bit [1:0] - oqpsk_data_rate refer to section 11.3 ?high data rate modes? on page 137 . bit 7 6 5 4 3 2 1 0 +0x0c rx_safe_mode reserved oqpsk_data_rate trx_ctrl_2 read/write r/w r r r r r r/w r/w reset value 0 0 0 0 0 0 0 0 table 11-17. dynamic frame buffer protection mode register bit value description rx_safe_mode (1) 0 disable dynamic frame buffer protection 1 enable dynamic frame buffer protection
155 8111c?mcu wireless?09/09 at86rf231 11.9 configurable start-of-frame delimiter 11.9.1 overview the sfd is a field indicating the end of the shr and the start of the packet data. the length of the sfd is 1 octet (2 symbols). this octet is used for byte synchronization only and is not included in the frame buffer. the value of the sfd could be changed if it is needed to operate non ieee 802.15.4 compliant networks. an ieee 802.15.4 compliant network node does not synchronize to frames with a dif- ferent sfd value. due to the way the shr is formed, it is not recommended to set the low-order 4 bits to 0. the lsb of the sfd is transmitted first, i.e. right after the last bit of the preamble sequence. 11.9.2 register description register 0x0b (sfd_value): this register contains the one octet start-of-fra me delimiter (sfd) to synchronize to a received frame. ? bit [7:0] - sfd_value for compliant ieee 802.15.4 networks set sfd_value = 0xa7, as specified by [1] and [2] . this is the default value of the register. to establish non ieee 802.15.4 compliant networks the sfd value can be changed to any other value. if enabled an irq_2 (rx_start) is issued only if the received sfd matches the register content of register sfd_value and a valid phr is received. b i t 76543210 +0x0b sfd_value[7:0] sfd_value read/write r/w r/w r/w r/w r/w r/w r/w r/w r e s e t v a l u e10100111
156 8111c?mcu wireless?09/09 at86rf231 12. electrical characteristics 12.1 absolute maximum ratings note: stresses beyond those listed under "absolut e maximum ratings" may cause permanent damage to the device. this is a stress rating only and functional operation of the device at these or any other conditions beyond those indicated in the oper ational sections of this specification are not implied. exposure to absolute maximum rating conditions for extended periods may affect device reliability. 12.2 recommended o perating range notes: 1. even if an implementation uses the external 1.8v voltage supply v dd1.8 it is required to connect v dd . 2. register 0x10 (vreg_ctrl) needs to be programmed to disable internal voltage regulators and supply blocks by an exter- nal 1.8v supply, refer to ?voltage regulators (avreg, dvreg)? on page 110 . table 12-1. absolute maximum ratings no. symbol parameter cond ition min. typ. max units 12.1.1 t stor storage temperature -50 150 c 12.1.2 t lead lead temperature t = 10s, (soldering profile compliant with ipc/jedec j std 020b) 260 c 12.1.3 v esd esd robustness compl. to [3] , compl. to [4] 5000 1500 v v 12.1.4 p rf input rf level +10 dbm 12.1.5 v dig voltage on all pins (except pins 4, 5, 13, 14, 29) -0.3 v dd +0.3 v 12.1.6 v ana voltage on pins 4, 5, 13, 14, 29 -0.3 2.0 v table 12-2. recommended operating range no. symbol parameter cond ition min. typ. max units 12.2.1 t op operating temperature range -40 +85 c 12.2.2 v dd supply voltage voltage on pins 15, 28 (1) 1.8 3.0 3.6 v 12.2.3 v dd1.8 supply voltage external voltage supply on pins 13, 14, 29 (2) 1.7 1.8 1.9 v
157 8111c?mcu wireless?09/09 at86rf231 12.3 digital pin characteristics .test conditions: t op = 25c (unless otherwise stated) note: 1. the capacitive load should not be larger than 50 pf for all i/os when using the default driver strength settings, refer to sec- tion 1.3.1 ?driver strength settings? on page 7 . generally, large load capacitances incr ease the overall current consumption. 12.4 digital interface timing characteristics test conditions: t op = 25c, v dd = 3.0v, c l = 50 pf (unless otherwise stated). table 12-3. digital pin characteristics no. symbol parameter cond ition min. typ. max units 12.3.1 v ih high level input voltage (1) v dd - 0.4 v 12.3.2 v il low level input voltage (1) 0.4 v 12.3.3 v oh high level output voltage (1) for all output driver strengths defined in trx_ctrl_0 v dd - 0.4 v 12.3.4 v ol low level output voltage (1) for all output driver strengths defined in trx_ctrl_0 0.4 v table 12-4. digital interface timing characteristics no. symbol parameter condition min. typ. max units 12.4.1 f sync sclk frequency synchronous operation 8 mhz 12.4.2 f async sclk frequency asynchronous operation 7.5 mhz 12.4.3 t 1 /sel low to miso active 180 ns 12.4.4 t 2 sclk to miso out data hold time 10 ns 12.4.5 t 3 mosi setup time 10 ns 12.4.6 t 4 mosi hold time 10 ns 12.4.7 t 5 lsb last byte to msb next byte 250 (2) ns 12.4.8 t 6 /sel high to miso tri state 10 ns 12.4.9 t 7 slp_tr pulse width tx start trigger 62.5 note (1) ns 12.4.10 t 8 spi idle time (sel rising to falling edge) spi read/write, standard sram and frame buffer access modes, idle time between consecutive spi accesses 250 ns 12.4.11 t 8 spi idle time (sel rising to falling edge) spi fast sram read/write access mode, refer to section 11.1.5 , idle time between consecutive spi accesses 500 ns 12.4.12 t 9 last sclk to /sel high 250 ns 12.4.13 t 10 reset pulse width 10 clock cycles at 16 mhz 625 ns 12.4.14 t 11 spi access latency after reset 10 clock cycles at 16 mhz 625 ns 12.4.15 t 12 aes core cycle time 24 s
158 8111c?mcu wireless?09/09 at86rf231 notes: 1. maximum pulse width less than (tx frame length + 16 s) 2. for fast sram read/write accesses on address space 0x82 - 0x94 the time t 5 (min.) increases to 450 ns. 12.5 general rf specifications test conditions (unless otherwise stated): v dd = 3.0v, f rf = 2.45 ghz, t op = 25c, measurement setup see figure 5-1 on page 12 . note: 1. a reference frequency accuracy of 40 ppm is required by [1] , [2] . 12.4.15 t 13 bfbp irq latency 750 ns 12.4.17 t irq interrupt event latency relative to the event to be indicated 9 s 12.4.18 f clkm clock frequency at pin 17 (clkm) configurable in register 0x03 (trx_ctrl_0) 0 1 2 4 8 16 250 62.5 mhz mhz mhz mhz mhz mhz khz khz table 12-4. digital interface timing characteristics (continued) table 12-5. general rf specifications no. symbol parameter cond ition min. typ. max units 12.5.1 f rf frequency range as specified in [1] , [2] 2405 2480 mhz 12.5.2 f ch channel spacing as specified in [1] , [2] 5m h z 12.5.3 f hdr header bit rate (shr, phr) as specified in [1] , [2] 250 kb/s 12.5.4 f psdu psdu bit rate as specified in [1] , [2] oqpsk_data_rate = 1 oqpsk_data_rate = 2 oqpsk_data_rate = 3 250 500 1000 2000 kb/s kb/s kb/s kb/s 12.5.5 f chip chip rate as specified in [1], [2] 2000 kchip/s 12.5.6 f clk crystal oscillator frequenc y reference oscillator 16 mhz 12.5.7 t xtal reference oscillator settling time leaving sleep state to clock available at pin 17 (clkm) 330 1000 s 12.5.8 symbol rate deviation reference frequency accuracy for correct functionality psdu bit rate 250 kb/s psdu bit rate 500 kb/s psdu bit rate 1000 kb/s psdu bit rate 2000 kb/s -60 (1) -40 -40 -30 +60 +40 +40 +30 ppm ppm ppm ppm 12.5.9 b 20db 20 db bandwidth 2.8 mhz
159 8111c?mcu wireless?09/09 at86rf231 12.6 transmitter characteristics test conditions (unless otherwise stated): v dd = 3.0v, f rf = 2.45 ghz, t op = 25c, measurement setup see figure 5-1 on page 12 . table 12-6. transmitter characteristics no. symbol parameter cond ition min. typ. max units 12.6.1 p tx tx output power maximum configurable tx output power value register bit tx_pwr = 0 0+3+6dbm 12.6.2 p range output power range 16 steps, configurable in register 0x05 (phy_tx_pwr) 20 db 12.6.3 p acc output power tolerance 3 db 12.6.4 tx return loss 100 differential impedance, p tx = +3 dbm 10 db 12.6.5 evm 8% r m s 12.6.6 p harm harmonics 2 nd harmonic 3 rd harmonic -45 -45 dbm dbm 12.6.7 p spur spurious emissions 30 - 1000 mhz >1 - 12.75 ghz 1.8 - 1.9 ghz 5.15 - 5.3 ghz complies with en 300 328/440, fcc-cfr-47 part 15, arib std-66, rss-210 -36 -30 -47 -47 dbm dbm dbm dbm
160 8111c?mcu wireless?09/09 at86rf231 12.7 receiver characteristics test conditions (unless otherwise stated): v dd = 3.0v, f rf = 2.45 ghz, t op = 25c, psdu bit rate = 250 kb/s, measurement setup see fig- ure 5-1 on page 12 . note: 1. offset equals 120 ppm. table 12-7. receiver characteristics no. symbol parameter condition min. typ. max units 12.7.1 p sens receiver sensitivity 250 kb/s 500 kb/s 1000 kb/s 2000 kb/s awgn channel, per 1%, psdu length 20 octets high data rate modes: psdu length 20 octets -101 -97 -95 -89 dbm dbm dbm dbm antenna diversity 250 kb/s, psdu 20 octets -99 dbm 12.7.2 rl return loss 100 differential impedance 10 db 12.7.3 nf noise figure 6d b 12.7.4 p rxmx maximum rx input level per 1%, psdu length of 20 octets 10 dbm 12.7.5 p acrn adjacent channel rejection: f = -5 mhz per 1%, psdu length of 20 octets, p rf = -82 dbm 32 db 12.7.6 p acrp adjacent channel rejection: f = +5 mhz per 1%, psdu length of 20 octets, p rf = -82 dbm 35 db 12.7.7 p aacr1 alternate channel rejection: f = |10 mhz | per 1%, psdu length of 20 octets, p rf = -82 dbm 48 db 12.7.8 p aacr2 2 nd alternate channel rejection: f = |15 mhz | per 1%, psdu length of 20 octets, p rf = -82 dbm 54 db 12.7.9 p spur spurious emissions: lo leakage 30 - 1000 mhz >1 - 12.75 ghz -70 -57 -47 dbm dbm dbm 12.7.10 f rxtxoffs tx/rx carrier frequency offset sensitivity loss < 2 db -300 (1) +300 khz 12.7.11 iip3 3 rd - order intercept point at maximum gain offset freq. interf. 1 = 5 mhz offset freq. interf. 2 = 10 mhz -10 dbm 12.7.12 iip2 2 nd - order intercept point at maximum gain offset freq. interf. 1 = 60 mhz offset freq. interf. 2 = 62 mhz 31 dbm 12.7.13 rssi tolerance tolerance within gain step 5 db 12.7.14 rssi dynamic range 81 db 12.7.15 rssi resolution 3d b 12.7.16 rssi sensitivity defined as rssi_base_val -91 dbm 12.7.17 minimum rssi value p rf rssi_base_val 0 12.7.18 maximum rssi value p rf > rssi_base_val + 81 db 28
161 8111c?mcu wireless?09/09 at86rf231 12.8 current consumpt ion specifications test conditions (unless otherwise stated): v dd = 3.0v, f rf = 2.45 ghz, t op = 25c, measurement setup see figure 5-1 on page 12 . note: 1. current consumption for all operating modes is reduced at lower v dd . 2. refer to section 9.1 ?receiver (rx)? on page 101 12.9 crystal parame ter requirements table 12-8. current consumption specifications (1) no. symbol parameter condition min. typ. max units 12.8.1 i busy_tx supply current transmit state p tx = 3 dbm p tx = 0 dbm p tx = -17 dbm 14 11.6 7.4 ma ma ma 12.8.2 i rx_on supply current rx_on state rx_on state - high input level 10.3 ma 12.8.3 i rx_on supply current rx_on state rx_on state - high sensitivity 12.3 ma 12.8.4 i pll_on_p supply current rx_on state rx_on state, with register setting rx_pdt_level > 0 (2) 11.8 ma 12.8.5 i pll_on supply current pll_on state pll_on state 5.6 ma 12.8.6 i trx_off supply current trx_off state trx_off state 0.4 ma 12.8.7 i sleep supply current sleep st ate sleep state 0.02 a table 12-9. crystal parameter requirements no. symbol parameter condition min. typ. max units 12.9.1 f 0 crystal frequency 16 mhz 12.9.2 c l load capacitance 8 14 pf 12.9.3 c 0 static capacitance 7pf 12.9.4 r 1 series resistance 100
162 8111c?mcu wireless?09/09 at86rf231 13. typical characteristics 13.1 active supply current the following charts showing each a typical behavior of the at86rf231. these figures are not tested during manufacturing. all power consumption measurements are performed with pin 17 (clkm) disabled, unless otherwise stated. the measurement setup used for the measurements is shown in figure 5-1 on page 12 . power consumption for the microcontroller required to program the radio transceiver is not included in the measurement results. the power consumption in sleep state mode is independent from clkm master clock rate selection. the current consumption is a function of several factors such as: operating voltage, operating frequency, loading of i/o pins, switching rate of i/o pins, and ambient temperature. the dominat- ing factors are operating voltage and ambient temperature. if possible the measurement results are not affected by current drawn from i/o pins. register, sram or frame buffer read or write accesses are not performed during current consumption measurements. 13.1.1 p_on and trx_off states figure 13-1. current consumptio n in p_on state 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 85 c 25 c -40 c 0 c 0 evdd [v] c u rrent cons u mption [ma] 0.1 0.2 0.3 0.4 0.7 0.6 0.5
163 8111c?mcu wireless?09/09 at86rf231 figure 13-2. current consumption in trx_off state 13.1.2 pll_on state figure 13-3. current consumption in pll_on state 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 85 c 25 c -40 c 0 c 0 evdd [v] c u rrent cons u mption [ma] 0.1 0.2 0.3 0.4 0.5 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 85 c 25 c -40 c 0 c 0 evdd [v] c u rrent cons u mption [ma] 1 2 3 4 7 6 5
164 8111c?mcu wireless?09/09 at86rf231 13.1.3 rx_on state figure 13-4. current consumption in rx_o n state - high sensitivity figure 13-5. current consumption in rx_o n state - high input level 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 85 c 25 c -40 c 0 c 0 evdd [v] c u rrent cons u mption [ma] 1 2 3 4 15 6 5 7 8 9 10 11 12 13 14 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 85 c 25 c -40 c 0 c 0 evdd [v] c u rrent cons u mption [ma] 1 2 3 4 15 6 5 7 8 9 10 11 12 13 14
165 8111c?mcu wireless?09/09 at86rf231 figure 13-6. current consumption in rx_on state - reduced sensitivity 13.1.4 tx_busy state figure 13-7. current consumption in tx_busy state - minimum output power 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 85 c 25 c -40 c 0 c 0 evdd [v] c u rrent cons u mption [ma] 1 2 3 4 15 6 5 7 8 9 10 11 12 13 14 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 85 c 25 c -40 c 0 c 0 evdd [v] c u rrent cons u mption [ma] 2 4 6 8 10 12 14
166 8111c?mcu wireless?09/09 at86rf231 figure 13-8. current consumption in tx_busy state - output power 0 dbm figure 13-9. current consumption in tx_busy state - maximum output power 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 85 c 25 c -40 c 0 c evdd [v] c u rrent cons u mption [ma] 0 2 4 16 6 8 10 12 14 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 85 c 25 c -40 c 0 c evdd [v] c u rrent cons u mption [ma] 0 2 4 16 6 8 10 12 14
167 8111c?mcu wireless?09/09 at86rf231 13.1.5 sleep figure 13-10. current consumption in sleep 13.2 state transition timing figure 13-11. transition time from evdd to p_on (clkm available) 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 85 c 25 c -40 c 0.1 evdd [v] c u rrent cons u mption [na] 1000 10 100 1 0 50 100 150 200 250 300 350 400 450 500 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 setting time [ms] evdd [v] 85 c 25 c -40 c 0 c
168 8111c?mcu wireless?09/09 at86rf231 figure 13-12. transition time from sleep to trx_off (irq_4 (awake_end)) figure 13-13. transition time from trx_off to pll_on 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 85 c 25 c -40 c 0 c 0 50 100 150 200 250 300 350 400 450 500 evdd [v] setting time [ms] state transition time [ s] 85 c 25 c -40 c 0 c evdd [v] 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 0 20 40 60 80 100 120 140
169 8111c?mcu wireless?09/09 at86rf231 14. register summary the at86rf231 provides a register space of 64 8-bit registers, used to configure, control and monitor the radio transceiver. note: all registers not mentioned within the following table are reserved for internal use and must not be overwritten. when writing to a register, any reserved bits shall be overwritten only with their reset value. addr name bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 page 0x00 - - - - - - - - - - 0x01 trx_status cca_done cca_status - trx_status[4] trx_status[3] trx_status[2] trx_status[1] trx_status[0] 44, 68, 97 0x02 trx_state trac_status[2] trac_status[1] trac_status[0] trx_cmd[4] trx_cmd[3] trx_cmd[2] trx_cmd[1] trx_cmd[0] 33, 44, 68 0x03 trx_ctrl_0 pad_io[1] pad_io[0] pad_io_clkm[1] pad_io_clkm[0] clkm_sha_sel clkm_ctrl[2] clkm_ctrl[1] clkm_ctrl[0] 8 , 118, 0x04 trx_ctrl_1 pa_ext_en irq_2_ext_en tx_auto_crc_on rx_bl_ctrl spi_cmd_mode[1] spi_cmd_mode[0] irq_mask_mode irq_polarity 24 , 30 , 148 0x05 phy_tx_pwr pa_buf_lt[1] pa_buf_lt[0] pa_lt[1] pa_lt[0] tx_pwr[3] tx_pwr[2] tx_pwr[1] tx_pwr[0] 105 0x06 phy_rssi rx_crc_valid rnd_value[1] rnd_value[0] rssi[4] rssi[3] rssi[2] rssi[1] rssi[0] 90 , 136 0x07 phy_ed_level ed_level[7] ed_level[6] ed_level[5] ed_level[4] ed_level[3] ed_level[2] ed_level[1] ed_level[0] 93 0x08 phy_cc_cca cca_request cca_mode[1] cca_mode[0] channel[4] channel[3] channel[2] channel[1] channel[0] 97 0x09 cca_thres - - - - cca_ed_thres[3] cca_ed_thres[2] cca_ed_thres[1] cca_ed_thres[0] 97 0x0a rx_ctrl - - - - pdt_thres[3] pdt_thres[2] pdt_thres[1] pdt_thres[0] 140 0x0b sfd_value sfd_value[7] sfd_value[6] sfd_value[5] sfd_value[4] sfd_value[3] sfd_value[2] sfd_value[1] sfd_value[0] 155 0x0c trx_ctrl_2 rx_safe_mode - - - - - oqpsk_data_rate[1] oqpsk_data_rate[0] 154 0x0d ant_div ant_sel - - - ant_div_en ant_ext_sw_en ant_ctrl[1] ant_ctrl[0] 143 0x0e irq_mask mask_bat_low mask_trx_ur mask_ami mask_cca_ed_done mask_trx_end mask_trx_start mask_pll_unlock mask_pll_lock 30 0x0f irq_status bat_low trx_ur ami cca_ed_done trx_end rx_start pll_unlock pll_lock 30 0x10 vreg_ctrl avreg_ext avdd_ok - - dvreg_ext dvdd_ok - - 111 0x11 batmon - - batmon_ok batmon_hr batmon_vth[3] batmon_vth[2] batmon_vth[1] batmon_vth[0] 113 0x12 xosc_ctrl xtal_mode[3] xtal_mode[2] xtal_mode[1] xtal_mode[0] xtal_trim[3] xtal_trim[2] xtal_trim[1] xtal_trim[0] 116 0x13 - - - - - - - - - 0x14 - - - - - - - - - 0x15 rx_syn rx_pdt_dis - - - rx_pdt_level[3] rx_pdt_level[2] rx_pdt_level[1] rx_pdt_level[0] 103 0x16 - - - - - - - - - 0x17 xah_ctrl_1 - - aack_fltr_res_ft aack_upld_res_ft - aack_ack_time aack_prom_mode - 68 , 140 0x18 ftn_ctrl ftn_start - - - - - - - 125 0x19 - - - - - - - - - 0x1a pll_cf pll_cf_start - - - - - - - 122 0x1b pll_dcu pll_dcu_start - - - - - - - 122 0x1c part_num part_num[7] part_num[6] part_num[5] part_num[4] part_num[3] part_num[2] part_num[1] part_num[0] 25 0x1d version_num version_num[7] version_num[6] version_num[5] version_num[4] version_num[3] version_num[2] version_num[1] version_num[0] 25 0x1e man_id_0 man_id_0[7] man_id_0[6] man_id_0[5] man_id_0[4] man_id_0[3] man_id_0[2] man_id_0[1] man_id_0[0] 25 0x1f man_id_1 man_id_1[7] man_id_1[6] man_id_1[5] man_id_1[4] man_id_1[3] man_id_1[2] man_id_1[1] man_id_1[0] 25 0x20 short_addr_0 short_addr_0[7] short_addr_0[6] short_addr_0[5] short_addr_0[4] short_addr_0[3] short_addr_0[2] short_addr_0[1] short_addr_0[0] 76 0x21 short_addr_1 short_addr_1[7] short_addr_1[6] short_addr_1[5] short_addr_1[4] short_addr_1[3] short_addr_1[2] short_addr_1[1] short_addr_1[0] 76 0x22 pan_id_0 pan_id_0[7] pan_id_0[6] pan_id_0[5] pan_id_0[4] pan_id_0[3] pan_id_0[2] pan_id_0[1] pan_id_0[0] 76 0x23 pan_id_1 pan_id_1[7] pan_id_1[6] pan_id_1[5] pan_id_1[4] pan_id_1[3] pan_id_1[2] pan_id_1[1] pan_id_1[0] 76 0x24 ieee_addr_0 ieee_addr_0[7] ieee_addr_0[6] ieee_addr_0[5] ieee_ addr_0[4] ieee_addr_0[3] ieee_addr _0[2] ieee_addr_0[ 1] ieee_addr_0[0] 76 0x25 ieee_addr_1 ieee_addr_1[7] ieee_addr_1[6] ieee_addr_1[5] ieee_ addr_1[4] ieee_addr_1[3] ieee_addr _1[2] ieee_addr_1[ 1] ieee_addr_1[0] 76 0x26 ieee_addr_2 ieee_addr_2[7] ieee_addr_2[6] ieee_addr_2[5] ieee_ addr_2[4] ieee_addr_2[3] ieee_addr _2[2] ieee_addr_2[ 1] ieee_addr_2[0] 76 0x27 ieee_addr_3 ieee_addr_3[7] ieee_addr_3[6] ieee_addr_3[5] ieee_ addr_3[4] ieee_addr_3[3] ieee_addr _3[2] ieee_addr_3[ 1] ieee_addr_3[0] 76 0x28 ieee_addr_4 ieee_addr_4[7] ieee_addr_4[6] ieee_addr_4[5] ieee_ addr_4[4] ieee_addr_4[3] ieee_addr _4[2] ieee_addr_4[ 1] ieee_addr_4[0] 76 0x29 ieee_addr_5 ieee_addr_5[7] ieee_addr_5[6] ieee_addr_5[5] ieee_ addr_5[4] ieee_addr_5[3] ieee_addr _5[2] ieee_addr_5[ 1] ieee_addr_5[0] 76 0x2a ieee_addr_6 ieee_addr_6[7] ieee_addr_6[6] ieee_addr_6[5] ieee_ addr_6[4] ieee_addr_6[3] ieee_addr _6[2] ieee_addr_6[ 1] ieee_addr_6[0] 76 0x2b ieee_addr_7 ieee_addr_7[7] ieee_addr_7[6] ieee_addr_7[5] ieee_ addr_7[4] ieee_addr_7[3] ieee_addr _7[2] ieee_addr_7[ 1] ieee_addr_7[0] 76 0x2c xah_ctrl_0 max_frame_retres[3] max_frame_retres[2] max_frame_retres[1] max_frame_retres[0] max_csma_retres[2] max_csma_retres[1] max_csma_retres[0] slotted_operation 68
170 8111c?mcu wireless?09/09 at86rf231 the reset values of the at86rf231 registers in state p_on (1, 2, 3) are shown in table 14-1 on page 170 . note: all reset values in table 14-1 on page 170 are only valid after a power on reset. after a reset pro- cedure (/rst = l) as described in section 7.1.4.5 ?reset procedure? on page 41 the reset values of selected registers (e.g. registers 0x01, 0x10, 0x11, 0x30) can differ from that in table 14-1 on page 170 . notes: 1. while the reset value of register 0x10 is 0x00, any practi cal access to the register is only possible when dvreg is act ive. so this register is normally always re ad out as 0x04. for details refer to section 9.4 ?voltage regulators (avreg, dvreg)? on page 110 . 2. while the reset value of register 0x11 is 0x02, any practical access to the register is only possible when batmon is acti- vated. so this register is normally always read out as 0x22 in p_on state. for details refer to section 9.5 ?battery monitor (batmon)? on page 113 . 3. while the reset value of register 0x30 is 0x00, any practical access to the regist er is only possible when the radio transcei ver is accessible. so the register is normally read out as: a) 0x11 after a reset in p_on state b) 0x07 after a reset in any other state 0x2d csma_seed_0 csma_seed_0[7] csma_seed_0[6] csma_seed_0[5] csma_seed_0[4] csma_seed_0[3] csma_seed_0[2] csma_seed_0[1] csma_seed_0[0] 68 0x2e csma_seed_1 aack_fvn_mode[1] aack_fvn_mode[0] aack_set_pd aack_dis_ack aack_i_am_coord csma_seed_1[2] csma_seed_1[1] csma_seed_1[0] 68 0x2f csma_be max_be[3] max_be[2] max_be[1] max_be[0] min_be[3] min_be[2] min_be[1] min_be[0] 68 .... - - - - - - - - - table 14-1. register summary - reset values address reset value address reset value address reset value address reset value 0x00 0x00 0x10 0x00 (1) 0x20 0xff 0x30 0x00 (3) 0x01 0x00 0x11 0x02 (2) 0x21 0xff 0x31 0x00 0x02 0x00 0x12 0xf0 0x22 0xff 0x32 0x00 0x03 0x19 0x13 0x00 0x23 0xff 0x34 0x00 0x04 0x20 0x14 0x00 0x24 0x00 0x34 0x00 0x05 0xc0 0x15 0x00 0x25 0x00 0x35 0x00 0x06 0x00 0x16 0x00 0x26 0x00 0x36 0x00 0x07 0xff 0x17 0x00 0x27 0x00 0x37 0x00 0x08 0x2b 0x18 0x58 0x28 0x00 0x38 0x00 0x09 0xc7 0x19 0x55 0x29 0x00 0x39 0x40 0x0a 0xb7 0x1a 0x57 0x2a 0x00 0x3a 0x00 0x0b 0xa7 0x1b 0x20 0x2b 0x00 0x3b 0x00 0x0c 0x00 0x1c 0x03 0x2c 0x38 0x3c 0x00 0x0d 0x03 0x1d 0x02 0x2d 0xea 0x3d 0x00 0x0e 0x00 0x1e 0x1f 0x2e 0x42 0x3e 0x00 0x0f 0x00 0x1f 0x00 0x2f 0x53 0x3f 0x00
171 8111c?mcu wireless?09/09 at86rf231 15. abbreviations aack - automatic acknowledgement ack - acknowledgement adc - analog-to-digital converter ad - antenna diversity agc - automated gain control aes - advanced encryption standard aret - automatic retransmission avreg - voltage regulator for analog building blocks awgn - additive white gaussian noise batmon - battery monitor bbp - base band processor bpf - band pass filter cbc - cipher block chaining crc - cyclic redundancy check cca - clear channel assessment csma-ca - carrier sense multiple access/collision avoidance cw - continuous wave dfbp - dynamic frame buffer protection dvreg - voltage regulator for digital building blocks ecb - electronic code book ed - energy detection esd - electrostatic discharge evm - error vector magnitude fcf - frame control field fcs - frame check sequence fifo - first in first out ftn - filter tuning network gpio - general purpose input output ism - industrial, scien tific, and medical ldo - low-drop output lna - low-noise amplifier lo - local oscillator lqi - link quality indicator lsb - least significant bit mac - medium access control
172 8111c?mcu wireless?09/09 at86rf231 mfr - mac footer mhr - mac header miso - spi interface: master input slave output mosi - spi interface: master output slave input msb - most significant bit msdu - mac service data unit mpdu - mac protocol data unit msk - minimum shift keying o-qpsk - offset - quadrature phase shift keying pa - power amplifier pan - personal area network pcb - printed circuit board per - packet error rate phr - phy header phy - physical layer pll - phase locked loop por - power-on reset ppf - poly-phase filter prbs - pseudo random bit sequence psdu - phy service data unit psd - power spectral mask qfn - quad flat no-lead package rf - radio frequency rssi - received signal strength indicator rx - receiver sclk - spi interface: spi clock /sel - spi interface: spi select sfd - start-of-frame delimiter shr - synchronization header spi - serial peripheral interface sram - static random access memory ssbf - single side band filter tx - transmitter vco - voltage controlled oscillator vreg - voltage regulator xosc - crystal oscillator
173 8111c?mcu wireless?09/09 at86rf231 16. ordering information note: t&r quantity 5 ,000. please contact your local atmel sales office for more detailed ordering information and minimum quantities. 17. soldering information recommended soldering profile is sp ecified in ipc/jedec j-std-.020c. 18. package thermal properties ordering code package voltage range temperature range at86rf231-zu qn 1.8v - 3.6v industrial (-40 c to +85 c) lead-free/halogen-free at86rf231-zf qn 1.8v - 3.6v industrial (-40 c to +125 c) lead-free/halogen-free package type description qn 32qn2, 32 lead 5.0x5.0 mm body, 0.50 mm pi tch, quad flat no-lead package (qfn) sawn thermal resistance velocity [m/s] theta ja [k/w] 0 40.9 1 35.7 2.5 32.0
174 8111c?mcu wireless?09/09 at86rf231 19. package drawing - 32qn2 title drawing no. gpc rev. packa g e drawin g contact: packagedrawings@atmel.com 32qn2 zjz a 32qn2 , 32-lead 5.0 x 5.0 mm body, 0.50 mm pitch, quad flat no lead package (qfn) sawn 11/26/07 notes: 1. this drawing is for general information only. refer to jedec drawing mo-220, variation vhhd-6, for proper dimensions, tolerances, datums, etc. 2. dimension b applies to metallized terminal and is measured between 0.15 mm and 0.30 mm from the terminal tip. if the terminal has the optional radius on the other end of the terminal, the dimension should not be measured in that radius area. common dimensions (unit of measure = mm) symbol min nom max note d 5.00 bsc e 5.00 bsc d2 3.20 3.30 3.40 e2 3.20 3.30 3.40 a 0.80 0.90 1.00 a1 0.0 0.02 0.05 a2 0.0 0.65 1.00 a3 0.20 ref l 0.30 0.40 0.50 e 0.50 bsc b 0.18 0.23 0.30 2 pin 1 corner pin 1 corner pin 1 corner pin 1 corner side view side view bottom view bottom view top view top view a3 a3 l b e2 e2 d2 d2 e e d a a1 a1 a2 a2
175 8111c?mcu wireless?09/09 at86rf231 20. appendix a - continuous transmission test mode 20.1 overview the at86rf231 offers a continuous transmission test mode to support final application / pro- duction tests as well as certific ation tests. using this test mode the radio transceiver transmits continuously a previously transferred frame (prbs mode) or a continuous wave signal (cw mode). in cw mode two different signal fre quencies per channel can be transmitted: ?f 1 = f ch + 0.5 mhz ?f 2 = f ch - 0.5 mhz here f ch is the channel center frequency programmed by register 0x08 (phy_cc_cca). note, in cw mode it is not possible to transmit an rf signal directly on the channel center frequency. psdu data in the frame buffer must contain at least a valid phr (see section 8.1 ?introduction - ieee 802.15.4 - 2006 frame format? on page 79 ) followed by psdu data. it is recommended to use a frame of maximum length (127 bytes) and arbitrary psdu data for the prbs mode. the shr and the phr are not transmitted. the transmission starts with the psdu data and is repeated continuously. 20.2 configuration before enabling continuous transmission test mode all register configurations shall be done as follow: ? tx channel setting (optional) ? tx output power setting (optional) ? mode selection (prbs / cw) a register access to register 0x36 and 0x1c enables the continuous transmission test mode. the transmission is started by enabling the pll (trx_cmd = pll_on) and writing the tx_start command to register 0x02. even for cw signal transmission it is required to write valid psdu data to the frame buffer. for prbs mode it is recommended to write a frame of maximum length. the detailed programming sequence is shown in table 20-1 on page 175 . the column r/w informs about writing (w) or reading (r) a register or the frame buffer. table 20-1. continuous transmission programming sequence. step action register r/w value description 1 reset reset at86rf231 2 register access 0x0e w 0x01 set irq mask register, enable irq_0 (pll_lock) 3 register access 0x04 w 0x00 disable tx_auto_crc_on 4 register access 0x02 w 0x03 set radio transceiver state trx_off 5 register access 0x03 w 0x01 set clock at pin 17 (clkm) 6 register access 0x08 w 0x33 set ieee 802.15.4 channel, e.g. 19 7 register access 0x05 w 0x00 set tx output power, e.g. to pmax
176 8111c?mcu wireless?09/09 at86rf231 note: 1. only required for cw mode, do not configure for prbs mode. 2. frame buffer content depends on desired transmitter operation mode, either prbs or cw mode. the content of the frame buffer has to be defined for continuous transmission prbs mode or cw mode. to measure the power spectral density (psd) mask of the transmitter it is recom- mended to use a random sequence of maximum length for the psdu data. to measure cw signals it is necessary to write either 0x00 or 0xff to the frame buffer, for details refer to table 20-2 on page 176 . table 20-2. frame buffer content for various continuous transmission modulation schemes 8 register access 0x01 r 0x08 verify trx_off state 9 register access 0x036 w 0x0f enable conti nuous transmission test mode - step # 1 10 (1) register access 0x0c w 0x03 enable high data rate mode, 2 mb/s 11 (1) register access 0x0a w 0xa7 configure high data rate mode 12 (2) frame buffer write access w write phr and psdu data (even for cw mode), refer to table 20-2 on page 176 . 13 register access 0x1c w 0x54 enable conti nuous transmission test mode - step # 2 14 register access 0x1c w 0x46 enable conti nuous transmission test mode - step # 3 15 register access 0x02 w 0x09 enable pll_on state 16 interrupt event 0x0f r 0x01 wait for irq_0 (pll_lock) 17 register access 0x02 w 0x02 initiate transmission, enter busy_tx state 18 measurement perform measurement 19 register access 0x1c w 0x00 disabl e continuous transmission test mode 20 reset reset at86rf231 step action frame content comment 12 frame buffer access random sequence modulated rf signal 0x00 (each byte) f ch - 0.5 mhz, cw signal 0xff (each byte) f ch + 0.5 mhz, cw signal
177 8111c?mcu wireless?09/09 at86rf231 20.3 register description register 0x36 (tst_ctrl_digi): register tst_ctrl_dig enables the continuous transmission test mode. ? bit [7:4] - reserved ? bit [3:0] - tst_ctrl_dig these register bits enable continuous transmission: b i t 76543210 +0x36 reserved tst_ctrl_dig tst_ctrl_digi read/write r/w r/w r/w r/w r/w r/w r/w r/w r e s e t v a l u e00100000 table 20-3. continuous transmission register bit value description tst_ctrl_dig 0x0 continuous transmission disabled 0xf continuous transmission enabled 0x1 - 0xe reserved
178 8111c?mcu wireless?09/09 at86rf231 21. appendix b - at86rf231-zf extended temperature range 21.1 introduction appendix b contains information specific to devices operating at temperatures up to 125 c. only deviations to the standard device at86rf231-zu are covered in this appendix, all other infor- mation are similar to previous sections. performance figures for 125 c are only valid for device part number at86rf231-zf. 21.2 electrical characteristics if not otherwise stated, electrical characteristics for typical operating conditions are similar to fig- ures provided in ?electrical characteri stics? on page 156 . table 21-1. recommended operating range no. symbol parameter cond ition min. typ. max units 21.2.1 t op operating temperature range -40 +125 c
179 8111c?mcu wireless?09/09 at86rf231 21.3 typical characteristics the following charts showing each a typical behavior of the at86rf231. these figures are not tested during manufacturing for all supply voltages and all temperatures. all power consumption measurements are performed with pin 17 (clkm) disabled, unless otherwise stated. power consumption for the microcontroller required to program the radio transceiver is not included in the measurement results. the power consumption in sleep state mode is independent from clkm master clock rate selection. the current consumption is a function of several factors such as: operating voltage, operating frequency, loading of i/o pins, switching rate of i/o pins, and ambient temperature. the dominat- ing factors are operating voltage and ambient temperature. if possible the measurement results are not affected by current drawn from i/o pins. register, sram or frame buffer read or write accesses are not performed during current consumption measurements. 21.4 active supply current 21.4.1 p_on and trx_off states figure 21-1. current consumptio n in p_on state 85 c 25 c -40 c 0 c 125 c 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 evdd [v] 0 c u rrent cons u mption [ma] 0.1 0.2 0.3 0.4 0.7 0.6 0.5
180 8111c?mcu wireless?09/09 at86rf231 figure 21-2. current consumption in trx_off state 21.4.2 pll_on state figure 21-3. current consumption in pll_on state 85 c 25 c -40 c 0 c 125 c 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 evdd [v] 0 c u rrent cons u mption [ma] 0.1 0.2 0.3 0.4 0.5 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 evdd [v] 85 c 25 c -40 c 0 c 125 c c u rrent cons u mption [ma] 8 0 2 3 4 5 6 7 1
181 8111c?mcu wireless?09/09 at86rf231 21.4.3 rx_on state figure 21-4. current consumption in rx_o n state - high sensitivity figure 21-5. current consumption in rx_o n state - high input level 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 evdd [v] 85 c 25 c -40 c 0 c 125 c 0 1 2 3 4 15 6 5 7 8 9 10 11 12 13 14 16 17 c u rrent cons u mption [ma] 0 1 2 4 15 6 5 7 8 9 10 11 12 13 14 16 17 c u rrent cons u mption [ma] 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 evdd [v] 85 c 25 c -40 c 0 c 125 c
182 8111c?mcu wireless?09/09 at86rf231 figure 21-6. current consumption in rx_on state - reduced sensitivity 21.4.4 tx_busy state figure 21-7. current consumption in tx_busy state - minimum output power 0 1 2 3 4 15 6 5 7 8 9 10 11 12 13 14 16 17 c u rrent cons u mption [ma] 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 evdd [v] 85 c 25 c -40 c 0 c 125 c 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 evdd [v] 85 c 25 c -40 c 0 c 125 c c u rrent cons u mption [ma] 16 0 2 4 6 8 10 12 14 18
183 8111c?mcu wireless?09/09 at86rf231 figure 21-8. current consumption in tx_busy state - output power 0 dbm figure 21-9. current consumption in tx_busy state - maximum output power c u rrent cons u mption [ma] 16 0 2 4 6 8 10 12 14 18 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 evdd [v] 85 c 25 c -40 c 0 c 125 c c u rrent cons u mption [ma] 16 0 2 4 6 8 10 12 14 18 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 evdd [v] 85 c 25 c -40 c 0 c 125 c
184 8111c?mcu wireless?09/09 at86rf231 21.4.5 sleep figure 21-10. current consumption in sleep 0.1 c u rrent cons u mption [na] 1 10 100 1000 10000 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 evdd [v] 85 c 25 c -40 c 125 c
185 8111c?mcu wireless?09/09 at86rf231 21.5 state transition timing figure 21-11. transition time from evdd to p_on (clkm available) figure 21-12. transition time from sleep to trx_off (irq_4 (awake_end)) 0 50 100 150 200 250 300 350 400 450 500 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 setting time [ms] evdd [v] 85 c 25 c -40 c 125 c 0 50 100 150 200 250 300 350 400 450 500 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 setting time [ms] evdd [v] 85 c 25 c -40 c 125 c
186 8111c?mcu wireless?09/09 at86rf231 figure 21-13. transition time from trx_off to pll_on state transition time [ s] 85 c 25 c -40 c evdd [v] 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 0 20 40 60 80 100 140 125 c 120
187 8111c?mcu wireless?09/09 at86rf231 21.6 receiver performance 21.6.1 sensitivity figure 21-14. sensitivity 21.6.2 adjacent & alternate channel selectivity (acrx) figure 21-15. adjacent and alternate channel selectivity -105 -103 -101 -99 -97 -95 -93 -91 -89 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 evdd [v] 85 c 25 c -40 c 125 c tx inp u t lev el [dbm] 0 10 20 30 40 50 60 70 -25 -20 -15 -10 -5 0 5 10 15 20 25 channel offset [mhz] 85 c 25 c -40 c 125 c selectiv ity [db]
188 8111c?mcu wireless?09/09 at86rf231 21.6.3 rssi figure 21-16. rssi 0 5 10 15 20 25 30 -100 -90 - 8 0 -70 -60 -50 -40 -30 -20 -10 0 rx input level [dbm] 85 c 25 c -40 c 125 c rssi v alu e
189 8111c?mcu wireless?09/09 at86rf231 21.7 transmitter performance 21.7.1 tx output power vs. tx power level figure 21-17. tx output power vs. tx_pwr (evdd = 3.0v, ch=19) 21.7.2 tx output power vs. evdd figure 21-18. tx output power vs. evdd (tx_pwr = 0, ch=19) -20 -18 -16 -14 -12 -10 -8 -6 -4 -2 0 2 4 6 01234567 8 9 101112131415 tx_pwr [register value] 85 c 25 c -40 c 125 c tx ou tp u t pow er [dbm] 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 evdd [v] 85 c 25 c -40 c 125 c tx ou tpu t pow er [dbm] 4 0 1 1.5 2 2.5 3 3.5 0.5
190 8111c?mcu wireless?09/09 at86rf231 21.7.3 tx output power vs. channel figure 21-19. tx output power vs. channel (evdd = 3.0v, tx_pwr = 0) 10 11 12 13 14 15 16 17 1 8 19 20 21 22 23 24 25 26 27 channel acct. ieee802.15.4 85 c 25 c -40 c 125 c tx ou tpu t pow er [dbm] 4 0 1 1.5 2 2.5 3 3.5 0.5
191 8111c?mcu wireless?09/09 at86rf231 21.7.4 tx evm vs. evdd figure 21-20. error vector magnitude (evm ) vs. evdd (tx_pwr = 0, ch=19) 0 1 2 3 4 5 6 7 8 9 10 error v ector magnitu de [% ] 85 c 25 c -40 c 125 c 1.6 1. 8 2.0 2.2 2.4 2.6 2. 8 3.0 3.2 3.4 3.6 3. 8 evdd [v]
192 8111c?mcu wireless?09/09 at86rf231 22. appendix c - errata 22.1 at86rf231 rev.a no known errata
193 8111c?mcu wireless?09/09 at86rf231 23. revision history 23.1 rev.8111c - 09/09 23.2 rev.8111b - 02/09 23.3 rev.8111a - 05/08 1. initial revision 1. updated the datasheet with a new device at86rf231-zf. 2. added ?appendix b - at86rf231-zf extend ed temperature range? on page 178 3. editorial updates. 1. updated figures and graphics in sections: 5. , 6. , 8. , 9. , 11. , 12. and 13. 2. changed register and sub-register names in ?at86rf231 extended feat ure set? on page 128 . 3. editorial changes.
194 8111c?mcu wireless?09/09 at86rf231 references [1] ieee std 802.15.4?-2 006: wireless medium access contro l (mac) and physical layer (phy) specifications for low-rate wireless personal area networks (lr-wpans) [2] ieee std 802.15.4?-2 003: wireless medium access contro l (mac) and physical layer (phy) specifications for low-rate wireless personal area networks (lr-wpans) [3] ansi / esd-stm5.1-2001: esd association standar d test method for electrostatic discharge sensitivity testing - human body model (hbm). [4] esd-stm5.3.1-1999: esd association standard test method for electrostatic discharge sensitivity testing - charged device model (cdm). [5] nist fips pub 197: advanced encryption standard (aes), fe deral information processing standards publication 197, us departme nt of commerce/nist , november 26, 2001 [6] at86rf231 software programming model
i 8111c?mcu wireless?09/09 at86rf231 table of contents features ................ ................ .............. ............... ............................ ............ 1 1 pin-out diagram ....... ................................ ................. ................ ............... 2 1.1 pin descriptions .................................................................................................3 1.2 analog and rf pins ...........................................................................................5 1.3 digital pins .........................................................................................................7 2 disclaimer .............. ............................ ............... ............................ ............ 9 3 overview ............ ................................ ............... ............................ ............ 9 4 general circuit description .... ................ ................. ................ ............. 10 5 application circuits .......... ................ ............... ............................ .......... 12 5.1 basic application schematic ...........................................................................12 5.2 extended feature set application schematic .................................................14 6 microcontroller interface .... .............. ............... ............................ .......... 16 6.1 spi timing description ....................................................................................17 6.2 spi protocol .....................................................................................................19 6.3 radio transceiver status information .............................................................24 6.4 radio transceiver identification ......................................................................25 6.5 sleep/wake-up and transmit signal (slp_tr) ..............................................27 6.6 interrupt logic ..................................................................................................29 7 operating modes ........ ................ ................. ................ ................. .......... 33 7.1 basic operating mode .....................................................................................33 7.2 extended operating mode ...............................................................................47 8 functional description ............ ................ ................. ................ ............. 79 8.1 introduction - ieee 802.15.4 - 2006 frame format ........................................79 8.2 frame check sequence (fcs) .......................................................................85 8.3 received signal strength indicator (rssi) .....................................................89 8.4 energy detection (ed) .....................................................................................91 8.5 clear channel assessment (cca) ..................................................................94 8.6 link quality indication (lqi) ............................................................................99 9 module description ................ ................ ................. ................ ............. 101 9.1 receiver (rx) ................................................................................................101 9.2 transmitter (tx) ............................................................................................104
ii 8111c?mcu wireless?09/09 at86rf231 9.3 frame buffer ..................................................................................................107 9.4 voltage regulators (avreg, dvreg) .........................................................110 9.5 battery monitor (batmon) ...........................................................................113 9.6 crystal oscillator (xosc) ..............................................................................116 9.7 frequency synthesizer (pll) ........................................................................121 9.8 automatic filter tuning (ftn) .......................................................................125 10 radio transceiver usage ...... ................ ................. ................ ............. 126 10.1 frame receive procedure .............................................................................126 10.2 frame transmit procedure ............................................................................127 11 at86rf231 extended feature se t .................. ............................ ........ 128 11.1 security module (aes) ... ................. ................ ............. ............ ............. ........128 11.2 random number generator ..........................................................................136 11.3 high data rate modes ..................................................................................137 11.4 antenna diversity ..........................................................................................142 11.5 rx/tx indicator .............................................................................................147 11.6 rx frame time stamping .............................................................................150 11.7 frame buffer empty indicator ........................................................................152 11.8 dynamic frame buffer protection .................................................................154 11.9 configurable start-of-frame delimiter ..........................................................155 12 electrical characteristics ... .............. ............... ............................ ........ 156 12.1 absolute maximum ratings ...........................................................................156 12.2 recommended operating range ..................................................................156 12.3 digital pin characteristics ..............................................................................157 12.4 digital interface timing characteristics .........................................................157 12.5 general rf specifications .............................................................................158 12.6 transmitter characteristics ............................................................................159 12.7 receiver characteristics ................................................................................160 12.8 current consumption specifications .............................................................161 12.9 crystal parameter requirements ..................................................................161 13 typical characteristics ....... .............. ............... ............................ ........ 162 13.1 active supply current ....................................................................................162 13.2 state transition timing ..................................................................................167 14 register summary ............ ........................................................ ........... 169 15 abbreviations ........... ................................ ................. ................ ........... 171
iii 8111c?mcu wireless?09/09 at86rf231 16 ordering information .......... .............. ............... ............................ ........ 173 17 soldering information ....... ........................................................ ........... 173 18 package thermal properties ................... ................. ................ ........... 173 19 package drawing - 32qn2 ..... ................ ................. ................ ............. 174 20 appendix a - continuous transmission test mode ... .............. ........ 175 20.1 overview ........................................................................................................175 20.2 configuration .................................................................................................175 20.3 register description ......................................................................................177 21 appendix b - at86rf231-zf exte nded temperature ra nge ........... 178 21.1 introduction ....................................................................................................178 21.2 electrical characteristics ...............................................................................178 21.3 typical characteristics ..................................................................................179 21.4 active supply current ....................................................................................179 21.5 state transition timing ..................................................................................185 21.6 receiver performance ...................................................................................187 21.7 transmitter performance ...............................................................................189 22 appendix c - errata .......... ........................................................ ........... 192 22.1 at86rf231 rev.a ........................................................................................192 23 revision history ....... ................................ ................. ................ ........... 193 23.1 rev.8111c - 09/09 ........................................................................................193 23.2 rev.8111b - 02/09 .........................................................................................193 23.3 rev.8111a - 05/08 .........................................................................................193 references.................................................................................. ........... 194 table of contents.......... ................. ................ ................. ................ ........... i
8111c?mcu wireless?09/09 headquarters international atmel corporation 2325 orchard parkway san jose, ca 95131 usa tel: 1(408) 441-0311 fax: 1(408) 487-2600 atmel asia unit 1-5 & 16, 19/f bea tower, millennium city 5 418 kwun tong road kwun tong, kowloon hong kong tel: (852) 2245-6100 fax: (852) 2722-1369 atmel europe le krebs 8, rue jean-pierre timbaud bp 309 78054 saint-quentin-en- yvelines cedex france tel: (33) 1-30-60-70-00 fax: (33) 1-30-60-71-11 atmel japan 9f, tonetsu shinkawa bldg. 1-24-8 shinkawa chuo-ku, tokyo 104-0033 japan tel: (81) 3-3523-3551 fax: (81) 3-3523-7581 product contact web site www.atmel.com technical support avr@atmel.com sales contact www.atmel.com/contacts literature requests www.atmel.com/literature disclaimer: the information in this document is provided in connection with atmel products. no license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of atmel products. except as set forth in atmel?s terms and condi- tions of sale located on atmel?s web site, atmel assumes no li ability whatsoever and disclaims any express, implied or statutor y warranty relating to its products including, but not limited to, the implied warranty of merchantability, fitness for a particu lar purpose, or non-infringement. in no event shall atmel be liable for any direct, indirect, consequential, punitive, special or i nciden- tal damages (including, without limitation, damages for loss of profits, business interruption, or loss of information) arising out of the use or inability to use this document, even if atme l has been advised of the possibility of such damages. atmel makes no representations or warranties with respect to the accuracy or comp leteness of the contents of this document and reserves the rig ht to make changes to specifications and product descriptions at any time without notice. atmel does not make any commitment to update the information contained her ein. unless specifically provided otherwise, atmel products are not suitable for, and shall not be used in, automotive applications. atmel?s products are not int ended, authorized, or warranted for use as components in applications in tended to support or sustain life. ? 2009 atmel corporation. all rights reserved. atmel ? , atmel logo and combinations thereof, avr ? , avr ? logo and others are registered trade- marks or trademarks of atmel corporation or its subsidiari es. other terms and product names may be trademarks of others.


▲Up To Search▲   

 
Price & Availability of AT86RF231-ZFR

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X